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