Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Ray Milkey | 34c9590 | 2015-04-15 09:47:53 -0700 | [diff] [blame] | 2 | * Copyright 2014-2015 Open Networking Laboratory |
Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 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 | */ |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 16 | package org.onosproject.store.serializers; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 17 | |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 18 | import com.google.common.collect.ImmutableList; |
| 19 | import com.google.common.collect.ImmutableMap; |
| 20 | import com.google.common.collect.ImmutableSet; |
| 21 | import org.onlab.packet.ChassisId; |
| 22 | import org.onlab.packet.Ip4Address; |
| 23 | import org.onlab.packet.Ip4Prefix; |
| 24 | import org.onlab.packet.Ip6Address; |
| 25 | import org.onlab.packet.Ip6Prefix; |
| 26 | import org.onlab.packet.IpAddress; |
| 27 | import org.onlab.packet.IpPrefix; |
| 28 | import org.onlab.packet.MacAddress; |
| 29 | import org.onlab.packet.VlanId; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 30 | import org.onlab.util.Frequency; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 31 | import org.onlab.util.KryoNamespace; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 32 | import org.onosproject.app.ApplicationState; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 33 | import org.onosproject.cluster.ControllerNode; |
| 34 | import org.onosproject.cluster.DefaultControllerNode; |
| 35 | import org.onosproject.cluster.Leadership; |
| 36 | import org.onosproject.cluster.LeadershipEvent; |
| 37 | import org.onosproject.cluster.NodeId; |
| 38 | import org.onosproject.cluster.RoleInfo; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 39 | import org.onosproject.core.DefaultApplication; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 40 | import org.onosproject.core.DefaultApplicationId; |
| 41 | import org.onosproject.core.DefaultGroupId; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 42 | import org.onosproject.core.Version; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 43 | import org.onosproject.mastership.MastershipTerm; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 44 | import org.onosproject.net.Annotations; |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 45 | import org.onosproject.net.ChannelSpacing; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 46 | import org.onosproject.net.ConnectPoint; |
| 47 | import org.onosproject.net.DefaultAnnotations; |
| 48 | import org.onosproject.net.DefaultDevice; |
| 49 | import org.onosproject.net.DefaultEdgeLink; |
| 50 | import org.onosproject.net.DefaultLink; |
| 51 | import org.onosproject.net.DefaultPath; |
| 52 | import org.onosproject.net.DefaultPort; |
| 53 | import org.onosproject.net.Device; |
| 54 | import org.onosproject.net.DeviceId; |
| 55 | import org.onosproject.net.Element; |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 56 | import org.onosproject.net.GridType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 57 | import org.onosproject.net.HostId; |
| 58 | import org.onosproject.net.HostLocation; |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 59 | import org.onosproject.net.IndexedLambda; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 60 | import org.onosproject.net.Link; |
| 61 | import org.onosproject.net.LinkKey; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 62 | import org.onosproject.net.OchPort; |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 63 | import org.onosproject.net.OchSignal; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 64 | import org.onosproject.net.OduCltPort; |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 65 | import org.onosproject.net.OduSignalType; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 66 | import org.onosproject.net.OmsPort; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 67 | import org.onosproject.net.Port; |
| 68 | import org.onosproject.net.PortNumber; |
| 69 | import org.onosproject.net.device.DefaultDeviceDescription; |
| 70 | import org.onosproject.net.device.DefaultPortDescription; |
| 71 | import org.onosproject.net.flow.CompletedBatchOperation; |
| 72 | import org.onosproject.net.flow.DefaultFlowEntry; |
| 73 | import org.onosproject.net.flow.DefaultFlowRule; |
| 74 | import org.onosproject.net.flow.DefaultTrafficSelector; |
| 75 | import org.onosproject.net.flow.DefaultTrafficTreatment; |
| 76 | import org.onosproject.net.flow.FlowEntry; |
| 77 | import org.onosproject.net.flow.FlowId; |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 78 | import org.onosproject.net.flow.FlowRule; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 79 | import org.onosproject.net.flow.FlowRuleBatchEntry; |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 80 | import org.onosproject.net.flow.FlowRuleBatchEvent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 81 | import org.onosproject.net.flow.FlowRuleBatchOperation; |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 82 | import org.onosproject.net.flow.FlowRuleBatchRequest; |
jcc | 3d4e14a | 2015-04-21 11:32:05 +0800 | [diff] [blame] | 83 | import org.onosproject.net.flow.FlowRuleExtPayLoad; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 84 | import org.onosproject.net.flow.StoredFlowEntry; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 85 | import org.onosproject.net.flow.criteria.Criterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 86 | import org.onosproject.net.flow.criteria.EthCriterion; |
| 87 | import org.onosproject.net.flow.criteria.EthTypeCriterion; |
| 88 | import org.onosproject.net.flow.criteria.IPCriterion; |
| 89 | import org.onosproject.net.flow.criteria.IPDscpCriterion; |
| 90 | import org.onosproject.net.flow.criteria.IPEcnCriterion; |
| 91 | import org.onosproject.net.flow.criteria.IPProtocolCriterion; |
| 92 | import org.onosproject.net.flow.criteria.IPv6ExthdrFlagsCriterion; |
| 93 | import org.onosproject.net.flow.criteria.IPv6FlowLabelCriterion; |
| 94 | import org.onosproject.net.flow.criteria.IPv6NDLinkLayerAddressCriterion; |
| 95 | import org.onosproject.net.flow.criteria.IPv6NDTargetAddressCriterion; |
| 96 | import org.onosproject.net.flow.criteria.IcmpCodeCriterion; |
| 97 | import org.onosproject.net.flow.criteria.IcmpTypeCriterion; |
| 98 | import org.onosproject.net.flow.criteria.Icmpv6CodeCriterion; |
| 99 | import org.onosproject.net.flow.criteria.Icmpv6TypeCriterion; |
Sho SHIMIZU | efc2e28 | 2015-05-04 15:26:23 -0700 | [diff] [blame^] | 100 | import org.onosproject.net.flow.criteria.IndexedLambdaCriterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 101 | import org.onosproject.net.flow.criteria.LambdaCriterion; |
| 102 | import org.onosproject.net.flow.criteria.MetadataCriterion; |
| 103 | import org.onosproject.net.flow.criteria.MplsCriterion; |
Sho SHIMIZU | 084c4ca | 2015-05-04 11:52:51 -0700 | [diff] [blame] | 104 | import org.onosproject.net.flow.criteria.OchSignalCriterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 105 | import org.onosproject.net.flow.criteria.OpticalSignalTypeCriterion; |
| 106 | import org.onosproject.net.flow.criteria.PortCriterion; |
| 107 | import org.onosproject.net.flow.criteria.SctpPortCriterion; |
| 108 | import org.onosproject.net.flow.criteria.TcpPortCriterion; |
| 109 | import org.onosproject.net.flow.criteria.UdpPortCriterion; |
| 110 | import org.onosproject.net.flow.criteria.VlanIdCriterion; |
| 111 | import org.onosproject.net.flow.criteria.VlanPcpCriterion; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 112 | import org.onosproject.net.flow.instructions.Instructions; |
| 113 | import org.onosproject.net.flow.instructions.L0ModificationInstruction; |
| 114 | import org.onosproject.net.flow.instructions.L2ModificationInstruction; |
| 115 | import org.onosproject.net.flow.instructions.L3ModificationInstruction; |
| 116 | import org.onosproject.net.host.DefaultHostDescription; |
| 117 | import org.onosproject.net.host.HostDescription; |
| 118 | import org.onosproject.net.intent.ConnectivityIntent; |
Brian O'Connor | a751537 | 2015-03-25 14:45:34 -0700 | [diff] [blame] | 119 | import org.onosproject.net.intent.FlowRuleIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 120 | import org.onosproject.net.intent.HostToHostIntent; |
| 121 | import org.onosproject.net.intent.Intent; |
| 122 | import org.onosproject.net.intent.IntentId; |
| 123 | import org.onosproject.net.intent.IntentOperation; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 124 | import org.onosproject.net.intent.IntentState; |
Jonathan Hart | 5ec32ba | 2015-02-05 13:33:58 -0800 | [diff] [blame] | 125 | import org.onosproject.net.intent.Key; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 126 | import org.onosproject.net.intent.LinkCollectionIntent; |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 127 | import org.onosproject.net.intent.MplsIntent; |
| 128 | import org.onosproject.net.intent.MplsPathIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 129 | import org.onosproject.net.intent.MultiPointToSinglePointIntent; |
| 130 | import org.onosproject.net.intent.OpticalConnectivityIntent; |
| 131 | import org.onosproject.net.intent.OpticalPathIntent; |
| 132 | import org.onosproject.net.intent.PathIntent; |
| 133 | import org.onosproject.net.intent.PointToPointIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 134 | import org.onosproject.net.intent.SinglePointToMultiPointIntent; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 135 | import org.onosproject.net.intent.constraint.AnnotationConstraint; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 136 | import org.onosproject.net.intent.constraint.BandwidthConstraint; |
| 137 | import org.onosproject.net.intent.constraint.BooleanConstraint; |
| 138 | import org.onosproject.net.intent.constraint.LambdaConstraint; |
| 139 | import org.onosproject.net.intent.constraint.LatencyConstraint; |
| 140 | import org.onosproject.net.intent.constraint.LinkTypeConstraint; |
| 141 | import org.onosproject.net.intent.constraint.ObstacleConstraint; |
| 142 | import org.onosproject.net.intent.constraint.WaypointConstraint; |
| 143 | import org.onosproject.net.link.DefaultLinkDescription; |
| 144 | import org.onosproject.net.packet.DefaultOutboundPacket; |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 145 | import org.onosproject.net.packet.DefaultPacketRequest; |
| 146 | import org.onosproject.net.packet.PacketPriority; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 147 | import org.onosproject.net.provider.ProviderId; |
| 148 | import org.onosproject.net.resource.Bandwidth; |
| 149 | import org.onosproject.net.resource.BandwidthResourceAllocation; |
| 150 | import org.onosproject.net.resource.BandwidthResourceRequest; |
| 151 | import org.onosproject.net.resource.DefaultLinkResourceAllocations; |
| 152 | import org.onosproject.net.resource.DefaultLinkResourceRequest; |
| 153 | import org.onosproject.net.resource.Lambda; |
| 154 | import org.onosproject.net.resource.LambdaResourceAllocation; |
| 155 | import org.onosproject.net.resource.LambdaResourceRequest; |
| 156 | import org.onosproject.net.resource.LinkResourceRequest; |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 157 | import org.onosproject.net.resource.MplsLabel; |
| 158 | import org.onosproject.net.resource.MplsLabelResourceAllocation; |
| 159 | import org.onosproject.net.resource.MplsLabelResourceRequest; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 160 | import org.onosproject.store.Timestamp; |
Madan Jampani | e97fec4 | 2015-02-17 10:53:42 -0800 | [diff] [blame] | 161 | import org.onosproject.store.service.Versioned; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 162 | |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 163 | import java.net.URI; |
| 164 | import java.time.Duration; |
| 165 | import java.util.ArrayList; |
| 166 | import java.util.Arrays; |
| 167 | import java.util.Collections; |
| 168 | import java.util.HashMap; |
| 169 | import java.util.HashSet; |
| 170 | import java.util.LinkedList; |
| 171 | import java.util.Optional; |
Yuta HIGUCHI | 47c4088 | 2014-10-10 18:44:37 -0700 | [diff] [blame] | 172 | |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 173 | public final class KryoNamespaces { |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 174 | |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 175 | public static final KryoNamespace BASIC = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 176 | .nextId(KryoNamespace.FLOATING_ID) |
| 177 | .register(byte[].class) |
| 178 | .register(new ImmutableListSerializer(), |
| 179 | ImmutableList.class, |
| 180 | ImmutableList.of(1).getClass(), |
| 181 | ImmutableList.of(1, 2).getClass()) |
| 182 | .register(new ImmutableSetSerializer(), |
| 183 | ImmutableSet.class, |
| 184 | ImmutableSet.of().getClass(), |
| 185 | ImmutableSet.of(1).getClass(), |
| 186 | ImmutableSet.of(1, 2).getClass()) |
| 187 | .register(new ImmutableMapSerializer(), |
| 188 | ImmutableMap.class, |
| 189 | ImmutableMap.of().getClass(), |
| 190 | ImmutableMap.of("a", 1).getClass(), |
| 191 | ImmutableMap.of("R", 2, "D", 2).getClass()) |
| 192 | .register(HashMap.class) |
| 193 | .register(ArrayList.class, |
| 194 | LinkedList.class, |
| 195 | HashSet.class |
| 196 | ) |
| 197 | .register(new ArraysAsListSerializer(), Arrays.asList().getClass()) |
| 198 | .register(Collections.singletonList(1).getClass()) |
| 199 | .register(Duration.class) |
Yuta HIGUCHI | ae1d210 | 2014-11-25 19:26:01 -0800 | [diff] [blame] | 200 | .register(Collections.emptySet().getClass()) |
Sho SHIMIZU | 166e61e | 2015-01-21 18:07:12 -0800 | [diff] [blame] | 201 | .register(Optional.class) |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 202 | .register(Collections.emptyList().getClass()) |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 203 | .register(Collections.unmodifiableSet(Collections.emptySet()).getClass()) |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 204 | .build(); |
| 205 | |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 206 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 207 | * KryoNamespace which can serialize ON.lab misc classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 208 | */ |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 209 | public static final KryoNamespace MISC = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 210 | .nextId(KryoNamespace.FLOATING_ID) |
| 211 | .register(new IpPrefixSerializer(), IpPrefix.class) |
| 212 | .register(new Ip4PrefixSerializer(), Ip4Prefix.class) |
| 213 | .register(new Ip6PrefixSerializer(), Ip6Prefix.class) |
| 214 | .register(new IpAddressSerializer(), IpAddress.class) |
| 215 | .register(new Ip4AddressSerializer(), Ip4Address.class) |
| 216 | .register(new Ip6AddressSerializer(), Ip6Address.class) |
| 217 | .register(new MacAddressSerializer(), MacAddress.class) |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 218 | .register(VlanId.class) |
Sho SHIMIZU | dee7871 | 2015-04-30 09:33:52 -0700 | [diff] [blame] | 219 | .register(Frequency.class) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 220 | .build(); |
| 221 | |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 222 | /** |
| 223 | * Kryo registration Id for user custom registration. |
| 224 | */ |
| 225 | public static final int BEGIN_USER_CUSTOM_ID = 300; |
| 226 | |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 227 | // TODO: Populate other classes |
| 228 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 229 | * KryoNamespace which can serialize API bundle classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 230 | */ |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 231 | public static final KryoNamespace API = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 232 | .nextId(KryoNamespace.INITIAL_ID) |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 233 | .register(BASIC) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 234 | .nextId(KryoNamespace.INITIAL_ID + 30) |
| 235 | .register(MISC) |
| 236 | .nextId(KryoNamespace.INITIAL_ID + 30 + 10) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 237 | .register( |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 238 | Version.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 239 | ControllerNode.State.class, |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 240 | ApplicationState.class, |
| 241 | DefaultApplication.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 242 | Device.Type.class, |
Thomas Vachuska | d16ce18 | 2014-10-29 17:25:29 -0700 | [diff] [blame] | 243 | Port.Type.class, |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 244 | ChassisId.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 245 | DefaultAnnotations.class, |
| 246 | DefaultControllerNode.class, |
| 247 | DefaultDevice.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 248 | DefaultDeviceDescription.class, |
Madan Jampani | 2ff0559 | 2014-10-10 15:42:47 -0700 | [diff] [blame] | 249 | DefaultLinkDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 250 | Port.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 251 | DefaultPortDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 252 | Element.class, |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 253 | Link.Type.class, |
Thomas Vachuska | 57126fe | 2014-11-11 17:13:24 -0800 | [diff] [blame] | 254 | Link.State.class, |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 255 | Timestamp.class, |
Madan Jampani | 1ee9178 | 2014-11-20 20:24:24 -0800 | [diff] [blame] | 256 | Leadership.class, |
| 257 | LeadershipEvent.class, |
| 258 | LeadershipEvent.Type.class, |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 259 | HostId.class, |
| 260 | HostDescription.class, |
Madan Jampani | 38b250d | 2014-10-17 11:02:38 -0700 | [diff] [blame] | 261 | DefaultHostDescription.class, |
Madan Jampani | 117aaae | 2014-10-23 10:04:05 -0700 | [diff] [blame] | 262 | DefaultFlowEntry.class, |
| 263 | StoredFlowEntry.class, |
sangho | 11c30ac | 2015-01-22 14:30:55 -0800 | [diff] [blame] | 264 | FlowRule.Type.class, |
Yuta HIGUCHI | 2fcfde9 | 2014-10-20 18:37:14 -0700 | [diff] [blame] | 265 | DefaultFlowRule.class, |
alshabib | 3d643ec | 2014-10-22 18:33:00 -0700 | [diff] [blame] | 266 | DefaultFlowEntry.class, |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 267 | DefaultPacketRequest.class, |
| 268 | PacketPriority.class, |
alshabib | f6c2ede | 2014-10-22 23:31:50 -0700 | [diff] [blame] | 269 | FlowEntry.FlowEntryState.class, |
Yuta HIGUCHI | 2809bf3 | 2014-10-20 22:44:12 -0700 | [diff] [blame] | 270 | FlowId.class, |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 271 | DefaultTrafficSelector.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 272 | PortCriterion.class, |
| 273 | MetadataCriterion.class, |
| 274 | EthCriterion.class, |
| 275 | EthTypeCriterion.class, |
| 276 | VlanIdCriterion.class, |
| 277 | VlanPcpCriterion.class, |
| 278 | IPDscpCriterion.class, |
| 279 | IPEcnCriterion.class, |
| 280 | IPProtocolCriterion.class, |
| 281 | IPCriterion.class, |
| 282 | TcpPortCriterion.class, |
| 283 | UdpPortCriterion.class, |
| 284 | SctpPortCriterion.class, |
| 285 | IcmpTypeCriterion.class, |
| 286 | IcmpCodeCriterion.class, |
| 287 | IPv6FlowLabelCriterion.class, |
| 288 | Icmpv6TypeCriterion.class, |
| 289 | Icmpv6CodeCriterion.class, |
| 290 | IPv6NDTargetAddressCriterion.class, |
| 291 | IPv6NDLinkLayerAddressCriterion.class, |
| 292 | MplsCriterion.class, |
| 293 | IPv6ExthdrFlagsCriterion.class, |
| 294 | LambdaCriterion.class, |
Sho SHIMIZU | efc2e28 | 2015-05-04 15:26:23 -0700 | [diff] [blame^] | 295 | IndexedLambdaCriterion.class, |
Sho SHIMIZU | 084c4ca | 2015-05-04 11:52:51 -0700 | [diff] [blame] | 296 | OchSignalCriterion.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 297 | OpticalSignalTypeCriterion.class, |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 298 | Criterion.class, |
| 299 | Criterion.Type.class, |
| 300 | DefaultTrafficTreatment.class, |
| 301 | Instructions.DropInstruction.class, |
Yuta HIGUCHI | 40d0177 | 2014-10-21 00:08:44 -0700 | [diff] [blame] | 302 | Instructions.OutputInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 303 | Instructions.GroupInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 304 | L0ModificationInstruction.class, |
| 305 | L0ModificationInstruction.L0SubType.class, |
| 306 | L0ModificationInstruction.ModLambdaInstruction.class, |
| 307 | L2ModificationInstruction.class, |
| 308 | L2ModificationInstruction.L2SubType.class, |
| 309 | L2ModificationInstruction.ModEtherInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 310 | L2ModificationInstruction.PushHeaderInstructions.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 311 | L2ModificationInstruction.ModVlanIdInstruction.class, |
| 312 | L2ModificationInstruction.ModVlanPcpInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 313 | L2ModificationInstruction.ModMplsLabelInstruction.class, |
| 314 | L2ModificationInstruction.ModMplsTtlInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 315 | L3ModificationInstruction.class, |
| 316 | L3ModificationInstruction.L3SubType.class, |
| 317 | L3ModificationInstruction.ModIPInstruction.class, |
Pavlin Radoslavov | febe82c | 2015-02-11 19:08:15 -0800 | [diff] [blame] | 318 | L3ModificationInstruction.ModIPv6FlowLabelInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 319 | L3ModificationInstruction.ModTtlInstruction.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 320 | RoleInfo.class, |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 321 | FlowRuleBatchEvent.class, |
| 322 | FlowRuleBatchEvent.Type.class, |
| 323 | FlowRuleBatchRequest.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 324 | FlowRuleBatchOperation.class, |
| 325 | CompletedBatchOperation.class, |
| 326 | FlowRuleBatchEntry.class, |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 327 | FlowRuleBatchEntry.FlowRuleOperation.class, |
| 328 | IntentId.class, |
| 329 | IntentState.class, |
Brian O'Connor | 4e6c17d | 2015-02-19 11:40:05 -0800 | [diff] [blame] | 330 | //Key.class, is abstract |
| 331 | Key.of(1L, new DefaultApplicationId(0, "bar")).getClass(), //LongKey.class |
| 332 | Key.of("foo", new DefaultApplicationId(0, "bar")).getClass(), //StringKey.class |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 333 | Intent.class, |
| 334 | ConnectivityIntent.class, |
| 335 | PathIntent.class, |
| 336 | DefaultPath.class, |
| 337 | DefaultEdgeLink.class, |
| 338 | HostToHostIntent.class, |
| 339 | PointToPointIntent.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 340 | MultiPointToSinglePointIntent.class, |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 341 | SinglePointToMultiPointIntent.class, |
Brian O'Connor | a751537 | 2015-03-25 14:45:34 -0700 | [diff] [blame] | 342 | FlowRuleIntent.class, |
Brian O'Connor | 41718fc | 2014-10-30 16:57:21 -0700 | [diff] [blame] | 343 | LinkCollectionIntent.class, |
| 344 | OpticalConnectivityIntent.class, |
| 345 | OpticalPathIntent.class, |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 346 | LinkResourceRequest.class, |
Yuta HIGUCHI | adac04a | 2014-11-13 00:02:45 -0800 | [diff] [blame] | 347 | DefaultLinkResourceRequest.class, |
| 348 | BandwidthResourceRequest.class, |
| 349 | LambdaResourceRequest.class, |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 350 | Lambda.class, |
| 351 | Bandwidth.class, |
Yuta HIGUCHI | adac04a | 2014-11-13 00:02:45 -0800 | [diff] [blame] | 352 | DefaultLinkResourceAllocations.class, |
| 353 | BandwidthResourceAllocation.class, |
| 354 | LambdaResourceAllocation.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame] | 355 | // Constraints |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 356 | LambdaConstraint.class, |
| 357 | BandwidthConstraint.class, |
| 358 | LinkTypeConstraint.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame] | 359 | LatencyConstraint.class, |
| 360 | WaypointConstraint.class, |
| 361 | ObstacleConstraint.class, |
| 362 | AnnotationConstraint.class, |
Brian O'Connor | 72a034c | 2014-11-26 18:24:23 -0800 | [diff] [blame] | 363 | BooleanConstraint.class, |
jcc | 3d4e14a | 2015-04-21 11:32:05 +0800 | [diff] [blame] | 364 | IntentOperation.class, |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 365 | FlowRuleExtPayLoad.class, |
| 366 | Frequency.class, |
| 367 | DefaultAnnotations.class |
| 368 | ) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 369 | .register(new DefaultApplicationIdSerializer(), DefaultApplicationId.class) |
| 370 | .register(new URISerializer(), URI.class) |
| 371 | .register(new NodeIdSerializer(), NodeId.class) |
| 372 | .register(new ProviderIdSerializer(), ProviderId.class) |
| 373 | .register(new DeviceIdSerializer(), DeviceId.class) |
| 374 | .register(new PortNumberSerializer(), PortNumber.class) |
| 375 | .register(new DefaultPortSerializer(), DefaultPort.class) |
| 376 | .register(new LinkKeySerializer(), LinkKey.class) |
| 377 | .register(new ConnectPointSerializer(), ConnectPoint.class) |
| 378 | .register(new DefaultLinkSerializer(), DefaultLink.class) |
| 379 | .register(new MastershipTermSerializer(), MastershipTerm.class) |
| 380 | .register(new HostLocationSerializer(), HostLocation.class) |
| 381 | .register(new DefaultOutboundPacketSerializer(), DefaultOutboundPacket.class) |
Madan Jampani | e97fec4 | 2015-02-17 10:53:42 -0800 | [diff] [blame] | 382 | .register(Versioned.class) |
Yuta HIGUCHI | f617123 | 2014-11-25 15:14:44 -0800 | [diff] [blame] | 383 | .register(DefaultGroupId.class) |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 384 | .register(Annotations.class) |
| 385 | .register(OmsPort.class) |
| 386 | .register(OchPort.class) |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 387 | .register(OduSignalType.class) |
| 388 | .register(GridType.class) |
| 389 | .register(ChannelSpacing.class) |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 390 | .register(OduCltPort.class) |
| 391 | .register(OduCltPort.SignalType.class) |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 392 | .register(IndexedLambda.class) |
| 393 | .register(OchSignal.class) |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 394 | .register( |
| 395 | MplsIntent.class, |
| 396 | MplsPathIntent.class, |
| 397 | MplsLabelResourceAllocation.class, |
| 398 | MplsLabelResourceRequest.class, |
| 399 | MplsLabel.class, |
sangho | b35a619 | 2015-04-01 13:05:26 -0700 | [diff] [blame] | 400 | org.onlab.packet.MplsLabel.class, |
| 401 | org.onlab.packet.MPLS.class |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 402 | ) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 403 | |
| 404 | .build(); |
| 405 | |
| 406 | |
| 407 | // not to be instantiated |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 408 | private KryoNamespaces() {} |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 409 | } |