Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright 2014 Open Networking Laboratory |
| 3 | * |
| 4 | * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | * you may not use this file except in compliance with the License. |
| 6 | * You may obtain a copy of the License at |
| 7 | * |
| 8 | * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | * |
| 10 | * Unless required by applicable law or agreed to in writing, software |
| 11 | * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | * See the License for the specific language governing permissions and |
| 14 | * limitations under the License. |
| 15 | */ |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 16 | package org.onlab.onos.store.serializers; |
| 17 | |
| 18 | import java.net.URI; |
| 19 | import java.util.ArrayList; |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 20 | import java.util.Arrays; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 21 | import java.util.HashMap; |
alshabib | 3d643ec | 2014-10-22 18:33:00 -0700 | [diff] [blame] | 22 | import java.util.HashSet; |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 23 | import java.util.LinkedList; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 24 | |
| 25 | import org.onlab.onos.cluster.ControllerNode; |
| 26 | import org.onlab.onos.cluster.DefaultControllerNode; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 27 | import org.onlab.onos.cluster.NodeId; |
Yuta HIGUCHI | 40d0177 | 2014-10-21 00:08:44 -0700 | [diff] [blame] | 28 | import org.onlab.onos.cluster.RoleInfo; |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 29 | import org.onlab.onos.core.DefaultApplicationId; |
Yuta HIGUCHI | 80912e6 | 2014-10-12 00:15:47 -0700 | [diff] [blame] | 30 | import org.onlab.onos.mastership.MastershipTerm; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 31 | import org.onlab.onos.net.ConnectPoint; |
| 32 | import org.onlab.onos.net.DefaultAnnotations; |
| 33 | import org.onlab.onos.net.DefaultDevice; |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 34 | import org.onlab.onos.net.DefaultEdgeLink; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 35 | import org.onlab.onos.net.DefaultLink; |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 36 | import org.onlab.onos.net.DefaultPath; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 37 | import org.onlab.onos.net.DefaultPort; |
| 38 | import org.onlab.onos.net.Device; |
| 39 | import org.onlab.onos.net.DeviceId; |
| 40 | import org.onlab.onos.net.Element; |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 41 | import org.onlab.onos.net.HostId; |
| 42 | import org.onlab.onos.net.HostLocation; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 43 | import org.onlab.onos.net.Link; |
| 44 | import org.onlab.onos.net.LinkKey; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 45 | import org.onlab.onos.net.Port; |
| 46 | import org.onlab.onos.net.PortNumber; |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 47 | import org.onlab.onos.net.device.DefaultDeviceDescription; |
| 48 | import org.onlab.onos.net.device.DefaultPortDescription; |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 49 | import org.onlab.onos.net.flow.CompletedBatchOperation; |
Madan Jampani | 117aaae | 2014-10-23 10:04:05 -0700 | [diff] [blame] | 50 | import org.onlab.onos.net.flow.DefaultFlowEntry; |
Madan Jampani | 38b250d | 2014-10-17 11:02:38 -0700 | [diff] [blame] | 51 | import org.onlab.onos.net.flow.DefaultFlowRule; |
Yuta HIGUCHI | 2809bf3 | 2014-10-20 22:44:12 -0700 | [diff] [blame] | 52 | import org.onlab.onos.net.flow.DefaultTrafficSelector; |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 53 | import org.onlab.onos.net.flow.DefaultTrafficTreatment; |
alshabib | f6c2ede | 2014-10-22 23:31:50 -0700 | [diff] [blame] | 54 | import org.onlab.onos.net.flow.FlowEntry; |
Yuta HIGUCHI | 2fcfde9 | 2014-10-20 18:37:14 -0700 | [diff] [blame] | 55 | import org.onlab.onos.net.flow.FlowId; |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 56 | import org.onlab.onos.net.flow.FlowRuleBatchEntry; |
| 57 | import org.onlab.onos.net.flow.FlowRuleBatchOperation; |
Madan Jampani | 117aaae | 2014-10-23 10:04:05 -0700 | [diff] [blame] | 58 | import org.onlab.onos.net.flow.StoredFlowEntry; |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 59 | import org.onlab.onos.net.flow.criteria.Criteria; |
| 60 | import org.onlab.onos.net.flow.criteria.Criterion; |
| 61 | import org.onlab.onos.net.flow.instructions.Instructions; |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 62 | import org.onlab.onos.net.flow.instructions.L0ModificationInstruction; |
| 63 | import org.onlab.onos.net.flow.instructions.L2ModificationInstruction; |
| 64 | import org.onlab.onos.net.flow.instructions.L3ModificationInstruction; |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 65 | import org.onlab.onos.net.host.DefaultHostDescription; |
| 66 | import org.onlab.onos.net.host.HostDescription; |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 67 | import org.onlab.onos.net.intent.ConnectivityIntent; |
| 68 | import org.onlab.onos.net.intent.HostToHostIntent; |
| 69 | import org.onlab.onos.net.intent.Intent; |
| 70 | import org.onlab.onos.net.intent.IntentId; |
| 71 | import org.onlab.onos.net.intent.IntentState; |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 72 | import org.onlab.onos.net.intent.LinkCollectionIntent; |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 73 | import org.onlab.onos.net.intent.MultiPointToSinglePointIntent; |
Brian O'Connor | 41718fc | 2014-10-30 16:57:21 -0700 | [diff] [blame] | 74 | import org.onlab.onos.net.intent.OpticalConnectivityIntent; |
| 75 | import org.onlab.onos.net.intent.OpticalPathIntent; |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 76 | import org.onlab.onos.net.intent.PathIntent; |
| 77 | import org.onlab.onos.net.intent.PointToPointIntent; |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame^] | 78 | import org.onlab.onos.net.intent.constraint.AnnotationConstraint; |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 79 | import org.onlab.onos.net.intent.constraint.BandwidthConstraint; |
| 80 | import org.onlab.onos.net.intent.constraint.BooleanConstraint; |
| 81 | import org.onlab.onos.net.intent.constraint.LambdaConstraint; |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame^] | 82 | import org.onlab.onos.net.intent.constraint.LatencyConstraint; |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 83 | import org.onlab.onos.net.intent.constraint.LinkTypeConstraint; |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame^] | 84 | import org.onlab.onos.net.intent.constraint.ObstacleConstraint; |
| 85 | import org.onlab.onos.net.intent.constraint.WaypointConstraint; |
Madan Jampani | 2ff0559 | 2014-10-10 15:42:47 -0700 | [diff] [blame] | 86 | import org.onlab.onos.net.link.DefaultLinkDescription; |
Jonathan Hart | 4f60f98 | 2014-10-27 08:11:17 -0700 | [diff] [blame] | 87 | import org.onlab.onos.net.packet.DefaultOutboundPacket; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 88 | import org.onlab.onos.net.provider.ProviderId; |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 89 | import org.onlab.onos.net.resource.Bandwidth; |
| 90 | import org.onlab.onos.net.resource.Lambda; |
Brian O'Connor | 41718fc | 2014-10-30 16:57:21 -0700 | [diff] [blame] | 91 | import org.onlab.onos.net.resource.LinkResourceRequest; |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 92 | import org.onlab.onos.store.Timestamp; |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 93 | import org.onlab.packet.ChassisId; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 94 | import org.onlab.packet.IpAddress; |
Pavlin Radoslavov | 17378ef | 2014-11-05 16:13:47 -0800 | [diff] [blame] | 95 | import org.onlab.packet.Ip4Address; |
| 96 | import org.onlab.packet.Ip6Address; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 97 | import org.onlab.packet.IpPrefix; |
Pavlin Radoslavov | 17378ef | 2014-11-05 16:13:47 -0800 | [diff] [blame] | 98 | import org.onlab.packet.Ip4Prefix; |
| 99 | import org.onlab.packet.Ip6Prefix; |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 100 | import org.onlab.packet.MacAddress; |
| 101 | import org.onlab.packet.VlanId; |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 102 | import org.onlab.util.KryoNamespace; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 103 | |
Yuta HIGUCHI | 47c4088 | 2014-10-10 18:44:37 -0700 | [diff] [blame] | 104 | import com.google.common.collect.ImmutableList; |
| 105 | import com.google.common.collect.ImmutableMap; |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 106 | import com.google.common.collect.ImmutableSet; |
Yuta HIGUCHI | 47c4088 | 2014-10-10 18:44:37 -0700 | [diff] [blame] | 107 | |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 108 | public final class KryoNamespaces { |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 109 | |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 110 | public static final KryoNamespace BASIC = KryoNamespace.newBuilder() |
| 111 | .register(ImmutableMap.class, new ImmutableMapSerializer()) |
| 112 | .register(ImmutableList.class, new ImmutableListSerializer()) |
| 113 | .register(ImmutableSet.class, new ImmutableSetSerializer()) |
| 114 | .register( |
| 115 | ArrayList.class, |
| 116 | Arrays.asList().getClass(), |
| 117 | HashMap.class, |
| 118 | HashSet.class, |
| 119 | LinkedList.class, |
| 120 | byte[].class |
| 121 | ) |
| 122 | .build(); |
| 123 | |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 124 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 125 | * KryoNamespace which can serialize ON.lab misc classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 126 | */ |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 127 | public static final KryoNamespace MISC = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 128 | .register(IpPrefix.class, new IpPrefixSerializer()) |
Pavlin Radoslavov | 17378ef | 2014-11-05 16:13:47 -0800 | [diff] [blame] | 129 | .register(Ip4Prefix.class, new Ip4PrefixSerializer()) |
| 130 | .register(Ip6Prefix.class, new Ip6PrefixSerializer()) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 131 | .register(IpAddress.class, new IpAddressSerializer()) |
Pavlin Radoslavov | 17378ef | 2014-11-05 16:13:47 -0800 | [diff] [blame] | 132 | .register(Ip4Address.class, new Ip4AddressSerializer()) |
| 133 | .register(Ip6Address.class, new Ip6AddressSerializer()) |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 134 | .register(MacAddress.class, new MacAddressSerializer()) |
| 135 | .register(VlanId.class) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 136 | .build(); |
| 137 | |
| 138 | // TODO: Populate other classes |
| 139 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 140 | * KryoNamespace which can serialize API bundle classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 141 | */ |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 142 | public static final KryoNamespace API = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 143 | .register(MISC) |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 144 | .register(BASIC) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 145 | .register( |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 146 | ControllerNode.State.class, |
| 147 | Device.Type.class, |
Thomas Vachuska | d16ce18 | 2014-10-29 17:25:29 -0700 | [diff] [blame] | 148 | Port.Type.class, |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 149 | ChassisId.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 150 | DefaultAnnotations.class, |
| 151 | DefaultControllerNode.class, |
| 152 | DefaultDevice.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 153 | DefaultDeviceDescription.class, |
Madan Jampani | 2ff0559 | 2014-10-10 15:42:47 -0700 | [diff] [blame] | 154 | DefaultLinkDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 155 | Port.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 156 | DefaultPortDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 157 | Element.class, |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 158 | Link.Type.class, |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 159 | Timestamp.class, |
| 160 | HostId.class, |
| 161 | HostDescription.class, |
Madan Jampani | 38b250d | 2014-10-17 11:02:38 -0700 | [diff] [blame] | 162 | DefaultHostDescription.class, |
Madan Jampani | 117aaae | 2014-10-23 10:04:05 -0700 | [diff] [blame] | 163 | DefaultFlowEntry.class, |
| 164 | StoredFlowEntry.class, |
Yuta HIGUCHI | 2fcfde9 | 2014-10-20 18:37:14 -0700 | [diff] [blame] | 165 | DefaultFlowRule.class, |
alshabib | 3d643ec | 2014-10-22 18:33:00 -0700 | [diff] [blame] | 166 | DefaultFlowEntry.class, |
alshabib | f6c2ede | 2014-10-22 23:31:50 -0700 | [diff] [blame] | 167 | FlowEntry.FlowEntryState.class, |
Yuta HIGUCHI | 2809bf3 | 2014-10-20 22:44:12 -0700 | [diff] [blame] | 168 | FlowId.class, |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 169 | DefaultTrafficSelector.class, |
| 170 | Criteria.PortCriterion.class, |
| 171 | Criteria.EthCriterion.class, |
| 172 | Criteria.EthTypeCriterion.class, |
| 173 | Criteria.IPCriterion.class, |
| 174 | Criteria.IPProtocolCriterion.class, |
| 175 | Criteria.VlanIdCriterion.class, |
| 176 | Criteria.VlanPcpCriterion.class, |
| 177 | Criteria.TcpPortCriterion.class, |
| 178 | Criterion.class, |
| 179 | Criterion.Type.class, |
| 180 | DefaultTrafficTreatment.class, |
| 181 | Instructions.DropInstruction.class, |
Yuta HIGUCHI | 40d0177 | 2014-10-21 00:08:44 -0700 | [diff] [blame] | 182 | Instructions.OutputInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 183 | L0ModificationInstruction.class, |
| 184 | L0ModificationInstruction.L0SubType.class, |
| 185 | L0ModificationInstruction.ModLambdaInstruction.class, |
| 186 | L2ModificationInstruction.class, |
| 187 | L2ModificationInstruction.L2SubType.class, |
| 188 | L2ModificationInstruction.ModEtherInstruction.class, |
| 189 | L2ModificationInstruction.ModVlanIdInstruction.class, |
| 190 | L2ModificationInstruction.ModVlanPcpInstruction.class, |
| 191 | L3ModificationInstruction.class, |
| 192 | L3ModificationInstruction.L3SubType.class, |
| 193 | L3ModificationInstruction.ModIPInstruction.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 194 | RoleInfo.class, |
| 195 | FlowRuleBatchOperation.class, |
| 196 | CompletedBatchOperation.class, |
| 197 | FlowRuleBatchEntry.class, |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 198 | FlowRuleBatchEntry.FlowRuleOperation.class, |
| 199 | IntentId.class, |
| 200 | IntentState.class, |
| 201 | Intent.class, |
| 202 | ConnectivityIntent.class, |
| 203 | PathIntent.class, |
| 204 | DefaultPath.class, |
| 205 | DefaultEdgeLink.class, |
| 206 | HostToHostIntent.class, |
| 207 | PointToPointIntent.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 208 | MultiPointToSinglePointIntent.class, |
Brian O'Connor | 41718fc | 2014-10-30 16:57:21 -0700 | [diff] [blame] | 209 | LinkCollectionIntent.class, |
| 210 | OpticalConnectivityIntent.class, |
| 211 | OpticalPathIntent.class, |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 212 | LinkResourceRequest.class, |
| 213 | Lambda.class, |
| 214 | Bandwidth.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame^] | 215 | // Constraints |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 216 | LambdaConstraint.class, |
| 217 | BandwidthConstraint.class, |
| 218 | LinkTypeConstraint.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame^] | 219 | LatencyConstraint.class, |
| 220 | WaypointConstraint.class, |
| 221 | ObstacleConstraint.class, |
| 222 | AnnotationConstraint.class, |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 223 | BooleanConstraint.class |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 224 | ) |
Thomas Vachuska | e0f804a | 2014-10-27 23:40:48 -0700 | [diff] [blame] | 225 | .register(DefaultApplicationId.class, new DefaultApplicationIdSerializer()) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 226 | .register(URI.class, new URISerializer()) |
| 227 | .register(NodeId.class, new NodeIdSerializer()) |
| 228 | .register(ProviderId.class, new ProviderIdSerializer()) |
| 229 | .register(DeviceId.class, new DeviceIdSerializer()) |
| 230 | .register(PortNumber.class, new PortNumberSerializer()) |
| 231 | .register(DefaultPort.class, new DefaultPortSerializer()) |
| 232 | .register(LinkKey.class, new LinkKeySerializer()) |
| 233 | .register(ConnectPoint.class, new ConnectPointSerializer()) |
| 234 | .register(DefaultLink.class, new DefaultLinkSerializer()) |
Yuta HIGUCHI | fa891c9 | 2014-10-09 15:21:40 -0700 | [diff] [blame] | 235 | .register(MastershipTerm.class, new MastershipTermSerializer()) |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 236 | .register(HostLocation.class, new HostLocationSerializer()) |
Jonathan Hart | 4f60f98 | 2014-10-27 08:11:17 -0700 | [diff] [blame] | 237 | .register(DefaultOutboundPacket.class, new DefaultOutboundPacketSerializer()) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 238 | |
| 239 | .build(); |
| 240 | |
| 241 | |
| 242 | // not to be instantiated |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 243 | private KryoNamespaces() {} |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 244 | } |