blob: 793b05be1948bdfd3703e5cd1a123d78821b0ad8 [file] [log] [blame]
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07001/*
Brian O'Connora09fe5b2017-08-03 21:12:30 -07002 * Copyright 2014-present Open Networking Foundation
Thomas Vachuska4f1a60c2014-10-28 13:39:07 -07003 *
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'Connorabafb502014-12-02 22:26:20 -080016package org.onosproject.store.serializers;
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -070017
Jonathan Hartad0c3022017-02-22 14:06:01 -080018import com.google.common.collect.HashMultiset;
Jonathan Hart45727852015-01-28 13:35:54 -080019import com.google.common.collect.ImmutableList;
20import com.google.common.collect.ImmutableMap;
21import com.google.common.collect.ImmutableSet;
Madan Jampani3ca9cb62015-07-21 11:35:44 -070022import com.google.common.collect.Maps;
Saurav Das9df5b7c2017-08-14 16:44:43 -070023import com.google.common.collect.Sets;
Jonathan Hart45727852015-01-28 13:35:54 -080024import org.onlab.packet.ChassisId;
alshabibcaf1ca22015-06-25 15:18:16 -070025import org.onlab.packet.EthType;
Jonathan Hart45727852015-01-28 13:35:54 -080026import org.onlab.packet.Ip4Address;
27import org.onlab.packet.Ip4Prefix;
28import org.onlab.packet.Ip6Address;
29import org.onlab.packet.Ip6Prefix;
30import org.onlab.packet.IpAddress;
31import org.onlab.packet.IpPrefix;
32import org.onlab.packet.MacAddress;
Hyunsun Mooncf732fb2015-08-22 21:04:23 -070033import org.onlab.packet.TpPort;
Jonathan Hart45727852015-01-28 13:35:54 -080034import org.onlab.packet.VlanId;
Sho SHIMIZU63feca72015-05-07 10:44:25 -070035import org.onlab.util.Bandwidth;
Sho SHIMIZUc0e010dd2016-05-02 14:46:22 -070036import org.onlab.util.ClosedOpenRange;
Marc De Leenheerbb382352015-04-23 18:20:34 -070037import org.onlab.util.Frequency;
Carmelo Cascone17fc9e42016-05-31 11:29:21 -070038import org.onlab.util.ImmutableByteSequence;
Jonathan Hart45727852015-01-28 13:35:54 -080039import org.onlab.util.KryoNamespace;
Madan Jampani063949f2016-01-26 12:10:05 -080040import org.onlab.util.Match;
Thomas Vachuska90b453f2015-01-30 18:57:14 -080041import org.onosproject.app.ApplicationState;
Brian O'Connorabafb502014-12-02 22:26:20 -080042import org.onosproject.cluster.ControllerNode;
43import org.onosproject.cluster.DefaultControllerNode;
Madan Jampani39fff102016-02-14 13:17:28 -080044import org.onosproject.cluster.Leader;
Brian O'Connorabafb502014-12-02 22:26:20 -080045import org.onosproject.cluster.Leadership;
46import org.onosproject.cluster.LeadershipEvent;
47import org.onosproject.cluster.NodeId;
48import org.onosproject.cluster.RoleInfo;
Changhoon Yoon32b93702015-05-15 04:41:15 +090049import org.onosproject.core.ApplicationRole;
Thomas Vachuska90b453f2015-01-30 18:57:14 -080050import org.onosproject.core.DefaultApplication;
Brian O'Connorabafb502014-12-02 22:26:20 -080051import org.onosproject.core.DefaultApplicationId;
Yi Tsengfa394de2017-02-01 11:26:40 -080052import org.onosproject.core.GroupId;
Thomas Vachuska90b453f2015-01-30 18:57:14 -080053import org.onosproject.core.Version;
Madan Jampani39fff102016-02-14 13:17:28 -080054import org.onosproject.event.Change;
Brian O'Connorce2d8b52015-07-29 16:24:13 -070055import org.onosproject.incubator.net.domain.IntentDomainId;
Brian O'Connorabafb502014-12-02 22:26:20 -080056import org.onosproject.mastership.MastershipTerm;
Marc De Leenheerbb382352015-04-23 18:20:34 -070057import org.onosproject.net.Annotations;
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070058import org.onosproject.net.ChannelSpacing;
Toru Furusawa72ee30c2016-01-08 13:29:04 -080059import org.onosproject.net.CltSignalType;
Brian O'Connorabafb502014-12-02 22:26:20 -080060import org.onosproject.net.ConnectPoint;
61import org.onosproject.net.DefaultAnnotations;
62import org.onosproject.net.DefaultDevice;
63import org.onosproject.net.DefaultEdgeLink;
Madan Jampani70583972015-06-30 11:25:05 -070064import org.onosproject.net.DefaultHost;
Brian O'Connorabafb502014-12-02 22:26:20 -080065import org.onosproject.net.DefaultLink;
66import org.onosproject.net.DefaultPath;
67import org.onosproject.net.DefaultPort;
68import org.onosproject.net.Device;
69import org.onosproject.net.DeviceId;
70import org.onosproject.net.Element;
Jonathan Hart26bd8132016-04-13 10:39:55 -070071import org.onosproject.net.EncapsulationType;
Brian O'Connor562d9d32016-10-07 12:16:50 -070072import org.onosproject.net.FilteredConnectPoint;
Sho SHIMIZU014c33a2015-04-30 11:40:37 -070073import org.onosproject.net.GridType;
Brian O'Connorabafb502014-12-02 22:26:20 -080074import org.onosproject.net.HostId;
75import org.onosproject.net.HostLocation;
76import org.onosproject.net.Link;
77import org.onosproject.net.LinkKey;
Yuta HIGUCHIeb28a7c2017-01-13 18:59:27 -080078import org.onosproject.net.MarkerResource;
Sho SHIMIZU91210a72015-04-29 12:54:28 -070079import org.onosproject.net.OchSignal;
Ayaka Koshibebcb02372015-06-01 10:56:42 -070080import org.onosproject.net.OchSignalType;
Yafit Hadar5796d972015-10-15 13:16:11 +030081import org.onosproject.net.OduSignalId;
Sho SHIMIZU91210a72015-04-29 12:54:28 -070082import org.onosproject.net.OduSignalType;
Rimon Ashkenazy8ebfff02016-02-01 11:56:36 +020083import org.onosproject.net.OtuSignalType;
Brian O'Connorabafb502014-12-02 22:26:20 -080084import org.onosproject.net.Port;
85import org.onosproject.net.PortNumber;
Luca Prete670ac5d2017-02-03 15:55:43 -080086import org.onosproject.net.ResourceGroup;
Rimon Ashkenazye2410ff2015-11-10 14:11:08 +020087import org.onosproject.net.TributarySlot;
Andreas Papazois05548962016-11-23 11:36:55 +020088import org.onosproject.net.behaviour.protection.ProtectedTransportEndpointDescription;
Brian O'Connorabafb502014-12-02 22:26:20 -080089import org.onosproject.net.device.DefaultDeviceDescription;
90import org.onosproject.net.device.DefaultPortDescription;
Thomas Vachuskafdbc4c22015-05-29 15:53:01 -070091import org.onosproject.net.device.DefaultPortStatistics;
Thomas Vachuskafdbc4c22015-05-29 15:53:01 -070092import org.onosproject.net.device.PortStatistics;
Michele Santuari38dd82e2017-01-04 09:23:49 +010093import org.onosproject.net.domain.DomainIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -080094import org.onosproject.net.flow.CompletedBatchOperation;
95import org.onosproject.net.flow.DefaultFlowEntry;
96import org.onosproject.net.flow.DefaultFlowRule;
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -070097import org.onosproject.net.flow.DefaultTableStatisticsEntry;
Brian O'Connorabafb502014-12-02 22:26:20 -080098import org.onosproject.net.flow.DefaultTrafficSelector;
99import org.onosproject.net.flow.DefaultTrafficTreatment;
100import org.onosproject.net.flow.FlowEntry;
101import org.onosproject.net.flow.FlowId;
Murat Parlakisikc6759e82016-06-29 03:22:22 -0700102import org.onosproject.net.flow.FlowRule;
Cem Türker3baff672017-10-12 15:09:01 +0300103import org.onosproject.net.flow.FlowRuleEvent;
104import org.onosproject.net.flow.FlowRuleExtPayLoad;
105import org.onosproject.net.flow.IndexTableId;
106import org.onosproject.net.flow.StatTriggerField;
107import org.onosproject.net.flow.StatTriggerFlag;
108import org.onosproject.net.flow.StoredFlowEntry;
109import org.onosproject.net.flow.TableId;
110import org.onosproject.net.flow.TableStatisticsEntry;
Ray Milkey7bf273c2017-09-27 16:15:15 -0700111import org.onosproject.net.flow.oldbatch.FlowRuleBatchEntry;
112import org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent;
113import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation;
114import org.onosproject.net.flow.oldbatch.FlowRuleBatchRequest;
Hyunsun Moonc8fe98b2016-01-11 00:01:46 -0800115import org.onosproject.net.flow.criteria.ArpHaCriterion;
116import org.onosproject.net.flow.criteria.ArpOpCriterion;
117import org.onosproject.net.flow.criteria.ArpPaCriterion;
Brian O'Connorabafb502014-12-02 22:26:20 -0800118import org.onosproject.net.flow.criteria.Criterion;
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700119import org.onosproject.net.flow.criteria.EthCriterion;
120import org.onosproject.net.flow.criteria.EthTypeCriterion;
Charles Chan14967c22015-12-07 11:11:50 -0800121import org.onosproject.net.flow.criteria.ExtensionCriterion;
122import org.onosproject.net.flow.criteria.ExtensionSelectorType;
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700123import org.onosproject.net.flow.criteria.IPCriterion;
124import org.onosproject.net.flow.criteria.IPDscpCriterion;
125import org.onosproject.net.flow.criteria.IPEcnCriterion;
126import org.onosproject.net.flow.criteria.IPProtocolCriterion;
127import org.onosproject.net.flow.criteria.IPv6ExthdrFlagsCriterion;
128import org.onosproject.net.flow.criteria.IPv6FlowLabelCriterion;
129import org.onosproject.net.flow.criteria.IPv6NDLinkLayerAddressCriterion;
130import org.onosproject.net.flow.criteria.IPv6NDTargetAddressCriterion;
131import org.onosproject.net.flow.criteria.IcmpCodeCriterion;
132import org.onosproject.net.flow.criteria.IcmpTypeCriterion;
133import org.onosproject.net.flow.criteria.Icmpv6CodeCriterion;
134import org.onosproject.net.flow.criteria.Icmpv6TypeCriterion;
135import org.onosproject.net.flow.criteria.LambdaCriterion;
136import org.onosproject.net.flow.criteria.MetadataCriterion;
Charles Chan7ba33f42015-12-15 19:27:30 -0800137import org.onosproject.net.flow.criteria.MplsBosCriterion;
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700138import org.onosproject.net.flow.criteria.MplsCriterion;
Sho SHIMIZU084c4ca2015-05-04 11:52:51 -0700139import org.onosproject.net.flow.criteria.OchSignalCriterion;
Sho SHIMIZUb5e6de62015-05-04 12:13:44 -0700140import org.onosproject.net.flow.criteria.OchSignalTypeCriterion;
Yafit Hadar5796d972015-10-15 13:16:11 +0300141import org.onosproject.net.flow.criteria.OduSignalIdCriterion;
142import org.onosproject.net.flow.criteria.OduSignalTypeCriterion;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200143import org.onosproject.net.flow.criteria.PiCriterion;
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700144import org.onosproject.net.flow.criteria.PortCriterion;
145import org.onosproject.net.flow.criteria.SctpPortCriterion;
146import org.onosproject.net.flow.criteria.TcpPortCriterion;
Hyunsun Moona08c5d02015-07-14 17:53:00 -0700147import org.onosproject.net.flow.criteria.TunnelIdCriterion;
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700148import org.onosproject.net.flow.criteria.UdpPortCriterion;
149import org.onosproject.net.flow.criteria.VlanIdCriterion;
150import org.onosproject.net.flow.criteria.VlanPcpCriterion;
alshabib880b6442015-11-23 22:13:04 -0800151import org.onosproject.net.flow.instructions.ExtensionTreatmentType;
Brian O'Connorabafb502014-12-02 22:26:20 -0800152import org.onosproject.net.flow.instructions.Instructions;
153import org.onosproject.net.flow.instructions.L0ModificationInstruction;
Yafit Hadar5796d972015-10-15 13:16:11 +0300154import org.onosproject.net.flow.instructions.L1ModificationInstruction;
Brian O'Connorabafb502014-12-02 22:26:20 -0800155import org.onosproject.net.flow.instructions.L2ModificationInstruction;
156import org.onosproject.net.flow.instructions.L3ModificationInstruction;
Hyunsun Moonc8bd97c2015-07-18 22:47:33 -0700157import org.onosproject.net.flow.instructions.L4ModificationInstruction;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200158import org.onosproject.net.flow.instructions.PiInstruction;
Charles Chanc72271f2016-04-05 15:15:27 -0700159import org.onosproject.net.flowobjective.DefaultFilteringObjective;
160import org.onosproject.net.flowobjective.DefaultForwardingObjective;
161import org.onosproject.net.flowobjective.DefaultNextObjective;
162import org.onosproject.net.flowobjective.FilteringObjective;
163import org.onosproject.net.flowobjective.ForwardingObjective;
164import org.onosproject.net.flowobjective.NextObjective;
165import org.onosproject.net.flowobjective.Objective;
Brian O'Connorabafb502014-12-02 22:26:20 -0800166import org.onosproject.net.host.DefaultHostDescription;
167import org.onosproject.net.host.HostDescription;
168import org.onosproject.net.intent.ConnectivityIntent;
Jonathan Hart6552b8d2016-04-12 14:21:50 -0700169import org.onosproject.net.intent.FlowObjectiveIntent;
Brian O'Connora7515372015-03-25 14:45:34 -0700170import org.onosproject.net.intent.FlowRuleIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -0800171import org.onosproject.net.intent.HostToHostIntent;
172import org.onosproject.net.intent.Intent;
173import org.onosproject.net.intent.IntentId;
174import org.onosproject.net.intent.IntentOperation;
Brian O'Connorabafb502014-12-02 22:26:20 -0800175import org.onosproject.net.intent.IntentState;
Jonathan Hart5ec32ba2015-02-05 13:33:58 -0800176import org.onosproject.net.intent.Key;
Brian O'Connorabafb502014-12-02 22:26:20 -0800177import org.onosproject.net.intent.LinkCollectionIntent;
178import org.onosproject.net.intent.MultiPointToSinglePointIntent;
Marc De Leenheer8c2caac2015-05-28 16:37:33 -0700179import org.onosproject.net.intent.OpticalCircuitIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -0800180import org.onosproject.net.intent.OpticalConnectivityIntent;
Rimon Ashkenazy27438ff2016-03-22 15:57:45 +0200181import org.onosproject.net.intent.OpticalOduIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -0800182import org.onosproject.net.intent.OpticalPathIntent;
183import org.onosproject.net.intent.PathIntent;
184import org.onosproject.net.intent.PointToPointIntent;
Yuta HIGUCHIb360bb02016-12-08 16:40:48 -0800185import org.onosproject.net.intent.ProtectedTransportIntent;
Andreas Papazois05548962016-11-23 11:36:55 +0200186import org.onosproject.net.intent.ProtectionEndpointIntent;
Brian O'Connorabafb502014-12-02 22:26:20 -0800187import org.onosproject.net.intent.SinglePointToMultiPointIntent;
Jonathan Hart45727852015-01-28 13:35:54 -0800188import org.onosproject.net.intent.constraint.AnnotationConstraint;
Brian O'Connorabafb502014-12-02 22:26:20 -0800189import org.onosproject.net.intent.constraint.BandwidthConstraint;
190import org.onosproject.net.intent.constraint.BooleanConstraint;
Pier Luigi02778b12017-09-11 17:51:13 +0200191import org.onosproject.net.intent.constraint.DomainConstraint;
Jonathan Hart26bd8132016-04-13 10:39:55 -0700192import org.onosproject.net.intent.constraint.EncapsulationConstraint;
jaegonkim7e876632017-01-25 06:01:49 +0900193import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint;
Brian O'Connorabafb502014-12-02 22:26:20 -0800194import org.onosproject.net.intent.constraint.LatencyConstraint;
195import org.onosproject.net.intent.constraint.LinkTypeConstraint;
196import org.onosproject.net.intent.constraint.ObstacleConstraint;
Jonathan Hart96c5a4a2015-07-31 14:23:33 -0700197import org.onosproject.net.intent.constraint.PartialFailureConstraint;
Yuta HIGUCHI625fb642016-09-01 16:10:24 -0700198import org.onosproject.net.intent.constraint.ProtectionConstraint;
Brian O'Connorabafb502014-12-02 22:26:20 -0800199import org.onosproject.net.intent.constraint.WaypointConstraint;
200import org.onosproject.net.link.DefaultLinkDescription;
alshabib10c810b2015-08-18 16:59:04 -0700201import org.onosproject.net.meter.MeterId;
Jian Li11260a02016-05-19 13:07:22 -0700202import org.onosproject.net.packet.DefaultOutboundPacket;
203import org.onosproject.net.packet.DefaultPacketRequest;
204import org.onosproject.net.packet.PacketPriority;
Carmelo Cascone87892e22017-11-13 16:01:29 -0800205import org.onosproject.net.pi.model.PiActionGroupType;
206import org.onosproject.net.pi.model.PiActionId;
207import org.onosproject.net.pi.model.PiActionParamId;
208import org.onosproject.net.pi.model.PiActionProfileId;
209import org.onosproject.net.pi.model.PiControlMetadataId;
210import org.onosproject.net.pi.model.PiCounterId;
211import org.onosproject.net.pi.model.PiCounterType;
212import org.onosproject.net.pi.model.PiMatchFieldId;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200213import org.onosproject.net.pi.model.PiMatchType;
Carmelo Cascone87892e22017-11-13 16:01:29 -0800214import org.onosproject.net.pi.model.PiMeterId;
215import org.onosproject.net.pi.model.PiMeterType;
216import org.onosproject.net.pi.model.PiPacketOperationType;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200217import org.onosproject.net.pi.model.PiPipeconfId;
Carmelo Cascone87892e22017-11-13 16:01:29 -0800218import org.onosproject.net.pi.model.PiTableId;
219import org.onosproject.net.pi.model.PiTableType;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200220import org.onosproject.net.pi.runtime.PiAction;
221import org.onosproject.net.pi.runtime.PiActionGroup;
222import org.onosproject.net.pi.runtime.PiActionGroupId;
223import org.onosproject.net.pi.runtime.PiActionGroupMember;
224import org.onosproject.net.pi.runtime.PiActionGroupMemberId;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200225import org.onosproject.net.pi.runtime.PiActionParam;
Carmelo Cascone87892e22017-11-13 16:01:29 -0800226import org.onosproject.net.pi.runtime.PiControlMetadata;
227import org.onosproject.net.pi.runtime.PiCounterCellData;
228import org.onosproject.net.pi.runtime.PiCounterCellId;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200229import org.onosproject.net.pi.runtime.PiExactFieldMatch;
230import org.onosproject.net.pi.runtime.PiFieldMatch;
Carmelo Cascone87b9b392017-10-02 18:33:20 +0200231import org.onosproject.net.pi.runtime.PiGroupKey;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200232import org.onosproject.net.pi.runtime.PiLpmFieldMatch;
233import org.onosproject.net.pi.runtime.PiMatchKey;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200234import org.onosproject.net.pi.runtime.PiPacketOperation;
235import org.onosproject.net.pi.runtime.PiPipeconfConfig;
236import org.onosproject.net.pi.runtime.PiRangeFieldMatch;
237import org.onosproject.net.pi.runtime.PiTableAction;
238import org.onosproject.net.pi.runtime.PiTableEntry;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200239import org.onosproject.net.pi.runtime.PiTernaryFieldMatch;
240import org.onosproject.net.pi.runtime.PiValidFieldMatch;
Jian Li11260a02016-05-19 13:07:22 -0700241import org.onosproject.net.provider.ProviderId;
Thomas Vachuskaeb851cd2016-07-21 15:41:05 -0700242import org.onosproject.net.region.DefaultRegion;
243import org.onosproject.net.region.Region;
244import org.onosproject.net.region.RegionId;
Sho SHIMIZUe18cb122016-02-22 21:04:56 -0800245import org.onosproject.net.resource.ContinuousResource;
246import org.onosproject.net.resource.ContinuousResourceId;
247import org.onosproject.net.resource.DiscreteResource;
Sho SHIMIZUc0e010dd2016-05-02 14:46:22 -0700248import org.onosproject.net.resource.DiscreteResourceCodec;
Sho SHIMIZUe18cb122016-02-22 21:04:56 -0800249import org.onosproject.net.resource.DiscreteResourceId;
250import org.onosproject.net.resource.ResourceAllocation;
Naoki Shiotabd1974c2016-04-29 18:44:17 -0700251import org.onosproject.net.resource.ResourceConsumerId;
Changhoon Yoone71dfa42015-12-04 21:49:25 +0900252import org.onosproject.security.Permission;
Brian O'Connorabafb502014-12-02 22:26:20 -0800253import org.onosproject.store.Timestamp;
Madan Jampani39fff102016-02-14 13:17:28 -0800254import org.onosproject.store.primitives.MapUpdate;
Madan Jampanicadd70b2016-02-08 13:45:43 -0800255import org.onosproject.store.primitives.TransactionId;
Madan Jampani50589ac2015-06-08 11:38:46 -0700256import org.onosproject.store.service.MapEvent;
Jonathan Hart46bf89b2017-02-27 15:56:42 -0800257import org.onosproject.store.service.MultimapEvent;
Madan Jampani50589ac2015-06-08 11:38:46 -0700258import org.onosproject.store.service.SetEvent;
Madan Jampani35708a92016-07-06 10:48:19 -0700259import org.onosproject.store.service.Task;
Carmelo Cascone72343c52017-09-05 17:37:10 +0200260import org.onosproject.store.service.TransactionLog;
Madan Jampanie97fec42015-02-17 10:53:42 -0800261import org.onosproject.store.service.Versioned;
Madan Jampani35708a92016-07-06 10:48:19 -0700262import org.onosproject.store.service.WorkQueueStats;
Simon Huntd7395c82016-10-20 17:54:01 -0700263import org.onosproject.ui.model.topo.UiTopoLayoutId;
Jordan Halterman980a8c12017-09-22 18:01:19 -0700264import org.onosproject.upgrade.Upgrade;
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700265
Jonathan Hart45727852015-01-28 13:35:54 -0800266import java.net.URI;
267import java.time.Duration;
268import java.util.ArrayList;
269import java.util.Arrays;
Jordi Ortiz1b1a3b42017-03-03 12:36:54 +0100270import java.util.BitSet;
Jonathan Hart45727852015-01-28 13:35:54 -0800271import java.util.Collections;
272import java.util.HashMap;
273import java.util.HashSet;
Sho SHIMIZU6c9e33a2016-01-07 18:45:27 -0800274import java.util.LinkedHashSet;
Jonathan Hart45727852015-01-28 13:35:54 -0800275import java.util.LinkedList;
276import java.util.Optional;
Madan Jampani86940d92015-05-06 11:47:57 -0700277import java.util.concurrent.ConcurrentHashMap;
278import java.util.concurrent.CopyOnWriteArraySet;
Madan Jampani6db0b442015-07-07 20:27:59 -0700279import java.util.concurrent.atomic.AtomicBoolean;
280import java.util.concurrent.atomic.AtomicInteger;
281import java.util.concurrent.atomic.AtomicLong;
Yuta HIGUCHI47c40882014-10-10 18:44:37 -0700282
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -0700283public final class KryoNamespaces {
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700284
Jonathan Hart679d24d2016-05-13 13:29:53 -0700285 public static final int BASIC_MAX_SIZE = 50;
Yuta HIGUCHI1aa249c2014-11-05 17:40:28 -0800286 public static final KryoNamespace BASIC = KryoNamespace.newBuilder()
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800287 .nextId(KryoNamespace.FLOATING_ID)
288 .register(byte[].class)
Madan Jampani6db0b442015-07-07 20:27:59 -0700289 .register(AtomicBoolean.class)
290 .register(AtomicInteger.class)
291 .register(AtomicLong.class)
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800292 .register(new ImmutableListSerializer(),
293 ImmutableList.class,
294 ImmutableList.of(1).getClass(),
Jimmy Jine9b7a022016-08-12 16:56:48 -0700295 ImmutableList.of(1, 2).getClass(),
296 ImmutableList.of(1, 2, 3).subList(1, 3).getClass())
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800297 .register(new ImmutableSetSerializer(),
298 ImmutableSet.class,
299 ImmutableSet.of().getClass(),
300 ImmutableSet.of(1).getClass(),
301 ImmutableSet.of(1, 2).getClass())
302 .register(new ImmutableMapSerializer(),
303 ImmutableMap.class,
304 ImmutableMap.of().getClass(),
305 ImmutableMap.of("a", 1).getClass(),
306 ImmutableMap.of("R", 2, "D", 2).getClass())
Madan Jampani10666e52016-02-11 16:46:42 -0800307 .register(Collections.unmodifiableSet(Collections.emptySet()).getClass())
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800308 .register(HashMap.class)
Madan Jampani86940d92015-05-06 11:47:57 -0700309 .register(ConcurrentHashMap.class)
310 .register(CopyOnWriteArraySet.class)
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800311 .register(ArrayList.class,
312 LinkedList.class,
Sho SHIMIZU6c9e33a2016-01-07 18:45:27 -0800313 HashSet.class,
314 LinkedHashSet.class
alshabib1aa58142016-02-17 15:37:56 -0800315 )
Jonathan Hartad0c3022017-02-22 14:06:01 -0800316 .register(HashMultiset.class)
Saurav Das9df5b7c2017-08-14 16:44:43 -0700317 .register(Sets.class)
Madan Jampani3ca9cb62015-07-21 11:35:44 -0700318 .register(Maps.immutableEntry("a", "b").getClass())
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800319 .register(new ArraysAsListSerializer(), Arrays.asList().getClass())
320 .register(Collections.singletonList(1).getClass())
321 .register(Duration.class)
Yuta HIGUCHIae1d2102014-11-25 19:26:01 -0800322 .register(Collections.emptySet().getClass())
Sho SHIMIZU166e61e2015-01-21 18:07:12 -0800323 .register(Optional.class)
Jonathan Hart45727852015-01-28 13:35:54 -0800324 .register(Collections.emptyList().getClass())
Marc De Leenheer4a1c1fa2015-06-01 18:08:56 -0700325 .register(Collections.singleton(Object.class).getClass())
Jian Li83fa0412016-05-06 12:33:49 -0700326 .register(int[].class)
327 .register(long[].class)
328 .register(short[].class)
329 .register(double[].class)
330 .register(float[].class)
331 .register(char[].class)
332 .register(String[].class)
333 .register(boolean[].class)
HIGUCHI Yutab2d0fd82016-05-17 20:34:58 -0700334 .build("BASIC");
Yuta HIGUCHI1aa249c2014-11-05 17:40:28 -0800335
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700336 /**
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -0700337 * KryoNamespace which can serialize ON.lab misc classes.
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700338 */
Jonathan Hart679d24d2016-05-13 13:29:53 -0700339 public static final int MISC_MAX_SIZE = 30;
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -0700340 public static final KryoNamespace MISC = KryoNamespace.newBuilder()
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800341 .nextId(KryoNamespace.FLOATING_ID)
342 .register(new IpPrefixSerializer(), IpPrefix.class)
343 .register(new Ip4PrefixSerializer(), Ip4Prefix.class)
344 .register(new Ip6PrefixSerializer(), Ip6Prefix.class)
345 .register(new IpAddressSerializer(), IpAddress.class)
346 .register(new Ip4AddressSerializer(), Ip4Address.class)
347 .register(new Ip6AddressSerializer(), Ip6Address.class)
348 .register(new MacAddressSerializer(), MacAddress.class)
Madan Jampani063949f2016-01-26 12:10:05 -0800349 .register(Match.class)
Yuta HIGUCHI5fa3dc02014-10-15 17:08:13 -0700350 .register(VlanId.class)
Sho SHIMIZUdee78712015-04-30 09:33:52 -0700351 .register(Frequency.class)
Sho SHIMIZU63feca72015-05-07 10:44:25 -0700352 .register(Bandwidth.class)
Sho SHIMIZU31f37ed2016-01-08 18:45:54 -0800353 .register(Bandwidth.bps(1L).getClass())
354 .register(Bandwidth.bps(1.0).getClass())
HIGUCHI Yutab2d0fd82016-05-17 20:34:58 -0700355 .build("MISC");
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700356
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800357 /**
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -0700358 * KryoNamespace which can serialize API bundle classes.
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700359 */
Jonathan Hart679d24d2016-05-13 13:29:53 -0700360 public static final int API_MAX_SIZE = 499;
Yuta HIGUCHI8d143d22014-10-19 23:15:09 -0700361 public static final KryoNamespace API = KryoNamespace.newBuilder()
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800362 .nextId(KryoNamespace.INITIAL_ID)
Yuta HIGUCHI1aa249c2014-11-05 17:40:28 -0800363 .register(BASIC)
Jonathan Hart679d24d2016-05-13 13:29:53 -0700364 .nextId(KryoNamespace.INITIAL_ID + BASIC_MAX_SIZE)
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800365 .register(MISC)
Jonathan Hart679d24d2016-05-13 13:29:53 -0700366 .nextId(KryoNamespace.INITIAL_ID + BASIC_MAX_SIZE + MISC_MAX_SIZE)
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700367 .register(
alshabib10c810b2015-08-18 16:59:04 -0700368 Instructions.MeterInstruction.class,
Cem Türker3baff672017-10-12 15:09:01 +0300369 Instructions.StatTriggerInstruction.class,
370 StatTriggerFlag.class,
371 StatTriggerField.class,
alshabib10c810b2015-08-18 16:59:04 -0700372 MeterId.class,
Thomas Vachuska90b453f2015-01-30 18:57:14 -0800373 Version.class,
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700374 ControllerNode.State.class,
Thomas Vachuska90b453f2015-01-30 18:57:14 -0800375 ApplicationState.class,
Changhoon Yoon32b93702015-05-15 04:41:15 +0900376 ApplicationRole.class,
Thomas Vachuska90b453f2015-01-30 18:57:14 -0800377 DefaultApplication.class,
Changhoon Yoone71dfa42015-12-04 21:49:25 +0900378 Permission.class,
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700379 Device.Type.class,
Thomas Vachuskad16ce182014-10-29 17:25:29 -0700380 Port.Type.class,
alshabib7911a052014-10-16 17:49:37 -0700381 ChassisId.class,
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700382 DefaultControllerNode.class,
383 DefaultDevice.class,
Madan Jampani53e44e62014-10-07 12:39:51 -0700384 DefaultDeviceDescription.class,
Madan Jampani70583972015-06-30 11:25:05 -0700385 DefaultHost.class,
Madan Jampani2ff05592014-10-10 15:42:47 -0700386 DefaultLinkDescription.class,
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700387 Port.class,
Madan Jampani53e44e62014-10-07 12:39:51 -0700388 DefaultPortDescription.class,
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700389 Element.class,
Yuta HIGUCHI9ee60f62014-10-09 10:00:01 -0700390 Link.Type.class,
Thomas Vachuska57126fe2014-11-11 17:13:24 -0800391 Link.State.class,
Yuta HIGUCHI5fa3dc02014-10-15 17:08:13 -0700392 Timestamp.class,
Madan Jampani39fff102016-02-14 13:17:28 -0800393 Change.class,
394 Leader.class,
Madan Jampani1ee91782014-11-20 20:24:24 -0800395 Leadership.class,
396 LeadershipEvent.class,
397 LeadershipEvent.Type.class,
Madan Jampani35708a92016-07-06 10:48:19 -0700398 Task.class,
399 WorkQueueStats.class,
Yuta HIGUCHI5fa3dc02014-10-15 17:08:13 -0700400 HostId.class,
401 HostDescription.class,
Madan Jampani38b250d2014-10-17 11:02:38 -0700402 DefaultHostDescription.class,
Madan Jampani117aaae2014-10-23 10:04:05 -0700403 DefaultFlowEntry.class,
404 StoredFlowEntry.class,
Yuta HIGUCHI2fcfde92014-10-20 18:37:14 -0700405 DefaultFlowRule.class,
Carmelo Cascone41605742017-06-19 15:46:44 +0900406 TableId.class,
407 IndexTableId.class,
Murat Parlakisikc6759e82016-06-29 03:22:22 -0700408 FlowRule.FlowRemoveReason.class,
alshabib42947782015-03-31 14:59:06 -0700409 DefaultPacketRequest.class,
410 PacketPriority.class,
alshabibf6c2ede2014-10-22 23:31:50 -0700411 FlowEntry.FlowEntryState.class,
Ray Milkey97db3502016-12-07 14:46:34 -0800412 FlowEntry.FlowLiveType.class,
Yuta HIGUCHI2809bf32014-10-20 22:44:12 -0700413 FlowId.class,
Yuta HIGUCHI85d58d12014-10-20 23:59:44 -0700414 DefaultTrafficSelector.class,
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700415 PortCriterion.class,
416 MetadataCriterion.class,
417 EthCriterion.class,
alshabibcaf1ca22015-06-25 15:18:16 -0700418 EthType.class,
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700419 EthTypeCriterion.class,
420 VlanIdCriterion.class,
421 VlanPcpCriterion.class,
422 IPDscpCriterion.class,
423 IPEcnCriterion.class,
424 IPProtocolCriterion.class,
425 IPCriterion.class,
Hyunsun Mooncf732fb2015-08-22 21:04:23 -0700426 TpPort.class,
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700427 TcpPortCriterion.class,
428 UdpPortCriterion.class,
429 SctpPortCriterion.class,
430 IcmpTypeCriterion.class,
431 IcmpCodeCriterion.class,
432 IPv6FlowLabelCriterion.class,
433 Icmpv6TypeCriterion.class,
434 Icmpv6CodeCriterion.class,
435 IPv6NDTargetAddressCriterion.class,
436 IPv6NDLinkLayerAddressCriterion.class,
437 MplsCriterion.class,
Charles Chan7ba33f42015-12-15 19:27:30 -0800438 MplsBosCriterion.class,
Hyunsun Moona08c5d02015-07-14 17:53:00 -0700439 TunnelIdCriterion.class,
Sho SHIMIZUfbc80e52015-04-28 10:41:58 -0700440 IPv6ExthdrFlagsCriterion.class,
441 LambdaCriterion.class,
Sho SHIMIZU084c4ca2015-05-04 11:52:51 -0700442 OchSignalCriterion.class,
Sho SHIMIZUb5e6de62015-05-04 12:13:44 -0700443 OchSignalTypeCriterion.class,
Yafit Hadar5796d972015-10-15 13:16:11 +0300444 OduSignalIdCriterion.class,
445 OduSignalTypeCriterion.class,
Hyunsun Moonc8fe98b2016-01-11 00:01:46 -0800446 ArpOpCriterion.class,
447 ArpHaCriterion.class,
448 ArpPaCriterion.class,
Yuta HIGUCHI85d58d12014-10-20 23:59:44 -0700449 Criterion.class,
450 Criterion.Type.class,
451 DefaultTrafficTreatment.class,
Charles Chan7efabeb2015-09-28 15:12:19 -0700452 Instructions.NoActionInstruction.class,
Yuta HIGUCHI40d01772014-10-21 00:08:44 -0700453 Instructions.OutputInstruction.class,
Pavlin Radoslavov1d218662015-02-13 11:34:30 -0800454 Instructions.GroupInstruction.class,
Steffen Gebert7c446e42016-06-21 23:22:20 +0200455 Instructions.SetQueueInstruction.class,
Srikanth Vavilapalli23181912015-05-04 09:48:09 -0700456 Instructions.TableTypeTransition.class,
Jonathan Hart68fef9d2014-10-29 17:30:03 -0700457 L0ModificationInstruction.class,
458 L0ModificationInstruction.L0SubType.class,
Sho SHIMIZUc6827092015-05-05 17:58:34 -0700459 L0ModificationInstruction.ModOchSignalInstruction.class,
Yafit Hadar5796d972015-10-15 13:16:11 +0300460 L1ModificationInstruction.class,
461 L1ModificationInstruction.L1SubType.class,
462 L1ModificationInstruction.ModOduSignalIdInstruction.class,
Jonathan Hart68fef9d2014-10-29 17:30:03 -0700463 L2ModificationInstruction.class,
464 L2ModificationInstruction.L2SubType.class,
465 L2ModificationInstruction.ModEtherInstruction.class,
Jian Li11260a02016-05-19 13:07:22 -0700466 L2ModificationInstruction.ModMplsHeaderInstruction.class,
Jonathan Hart68fef9d2014-10-29 17:30:03 -0700467 L2ModificationInstruction.ModVlanIdInstruction.class,
468 L2ModificationInstruction.ModVlanPcpInstruction.class,
Jian Li11260a02016-05-19 13:07:22 -0700469 L2ModificationInstruction.ModVlanHeaderInstruction.class,
Pavlin Radoslavov1d218662015-02-13 11:34:30 -0800470 L2ModificationInstruction.ModMplsLabelInstruction.class,
Saurav Das8a0732e2015-11-20 15:27:53 -0800471 L2ModificationInstruction.ModMplsBosInstruction.class,
Pavlin Radoslavov1d218662015-02-13 11:34:30 -0800472 L2ModificationInstruction.ModMplsTtlInstruction.class,
Hyunsun Moona08c5d02015-07-14 17:53:00 -0700473 L2ModificationInstruction.ModTunnelIdInstruction.class,
Jonathan Hart68fef9d2014-10-29 17:30:03 -0700474 L3ModificationInstruction.class,
475 L3ModificationInstruction.L3SubType.class,
476 L3ModificationInstruction.ModIPInstruction.class,
Pavlin Radoslavovfebe82c2015-02-11 19:08:15 -0800477 L3ModificationInstruction.ModIPv6FlowLabelInstruction.class,
Pavlin Radoslavov1d218662015-02-13 11:34:30 -0800478 L3ModificationInstruction.ModTtlInstruction.class,
Hyunsun Moonc8bd97c2015-07-18 22:47:33 -0700479 L4ModificationInstruction.class,
480 L4ModificationInstruction.L4SubType.class,
481 L4ModificationInstruction.ModTransportPortInstruction.class,
Yuta HIGUCHI9def0472014-10-23 15:51:10 -0700482 RoleInfo.class,
Brian O'Connor72cb19a2015-01-16 16:14:41 -0800483 FlowRuleBatchEvent.class,
484 FlowRuleBatchEvent.Type.class,
485 FlowRuleBatchRequest.class,
Yuta HIGUCHI9def0472014-10-23 15:51:10 -0700486 FlowRuleBatchOperation.class,
Madan Jampani87e276b2015-06-02 10:49:47 -0700487 FlowRuleEvent.class,
488 FlowRuleEvent.Type.class,
Yuta HIGUCHI9def0472014-10-23 15:51:10 -0700489 CompletedBatchOperation.class,
490 FlowRuleBatchEntry.class,
Yuta HIGUCHI087019b2014-10-28 21:07:56 -0700491 FlowRuleBatchEntry.FlowRuleOperation.class,
492 IntentId.class,
493 IntentState.class,
Brian O'Connor4e6c17d2015-02-19 11:40:05 -0800494 //Key.class, is abstract
495 Key.of(1L, new DefaultApplicationId(0, "bar")).getClass(), //LongKey.class
496 Key.of("foo", new DefaultApplicationId(0, "bar")).getClass(), //StringKey.class
Yuta HIGUCHI087019b2014-10-28 21:07:56 -0700497 Intent.class,
498 ConnectivityIntent.class,
499 PathIntent.class,
500 DefaultPath.class,
501 DefaultEdgeLink.class,
502 HostToHostIntent.class,
503 PointToPointIntent.class,
Jonathan Hart68fef9d2014-10-29 17:30:03 -0700504 MultiPointToSinglePointIntent.class,
Michele Santuari4a338072014-11-05 18:38:55 +0100505 SinglePointToMultiPointIntent.class,
Brian O'Connora7515372015-03-25 14:45:34 -0700506 FlowRuleIntent.class,
Brian O'Connor41718fc2014-10-30 16:57:21 -0700507 LinkCollectionIntent.class,
508 OpticalConnectivityIntent.class,
509 OpticalPathIntent.class,
Marc De Leenheer8c2caac2015-05-28 16:37:33 -0700510 OpticalCircuitIntent.class,
Rimon Ashkenazy27438ff2016-03-22 15:57:45 +0200511 OpticalOduIntent.class,
Jonathan Hart6552b8d2016-04-12 14:21:50 -0700512 FlowObjectiveIntent.class,
Sho SHIMIZUf33b8932016-01-25 18:43:32 -0800513 DiscreteResource.class,
514 ContinuousResource.class,
Sho SHIMIZUf33b8932016-01-25 18:43:32 -0800515 DiscreteResourceId.class,
516 ContinuousResourceId.class,
Sho SHIMIZU1f5e5912015-08-10 17:00:00 -0700517 ResourceAllocation.class,
Naoki Shiotabd1974c2016-04-29 18:44:17 -0700518 ResourceConsumerId.class,
Luca Prete670ac5d2017-02-03 15:55:43 -0800519 ResourceGroup.class,
Sho SHIMIZUcd4bac82014-11-11 17:07:25 -0800520 // Constraints
Thomas Vachuska7d0032b2014-11-04 17:39:57 -0800521 BandwidthConstraint.class,
522 LinkTypeConstraint.class,
Sho SHIMIZUcd4bac82014-11-11 17:07:25 -0800523 LatencyConstraint.class,
524 WaypointConstraint.class,
525 ObstacleConstraint.class,
526 AnnotationConstraint.class,
Brian O'Connor72a034c2014-11-26 18:24:23 -0800527 BooleanConstraint.class,
Jonathan Hart96c5a4a2015-07-31 14:23:33 -0700528 PartialFailureConstraint.class,
jcc3d4e14a2015-04-21 11:32:05 +0800529 IntentOperation.class,
Marc De Leenheerbb382352015-04-23 18:20:34 -0700530 FlowRuleExtPayLoad.class,
Thomas Vachuskafdbc4c22015-05-29 15:53:01 -0700531 DefaultAnnotations.class,
532 PortStatistics.class,
Brian O'Connorce2d8b52015-07-29 16:24:13 -0700533 DefaultPortStatistics.class,
Srikanth Vavilapalli95810f52015-09-14 15:49:56 -0700534 IntentDomainId.class,
535 TableStatisticsEntry.class,
Charles Chanc72271f2016-04-05 15:15:27 -0700536 DefaultTableStatisticsEntry.class,
Jonathan Hart26bd8132016-04-13 10:39:55 -0700537 EncapsulationConstraint.class,
538 EncapsulationType.class,
jaegonkim7e876632017-01-25 06:01:49 +0900539 HashedPathSelectionConstraint.class,
Charles Chanc72271f2016-04-05 15:15:27 -0700540 // Flow Objectives
541 DefaultForwardingObjective.class,
542 ForwardingObjective.Flag.class,
543 DefaultFilteringObjective.class,
544 FilteringObjective.Type.class,
545 DefaultNextObjective.class,
546 NextObjective.Type.class,
547 Objective.Operation.class
Marc De Leenheerbb382352015-04-23 18:20:34 -0700548 )
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800549 .register(new DefaultApplicationIdSerializer(), DefaultApplicationId.class)
Jonathan Hartd9df7bd2015-11-10 17:10:25 -0800550 .register(new UriSerializer(), URI.class)
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800551 .register(new NodeIdSerializer(), NodeId.class)
552 .register(new ProviderIdSerializer(), ProviderId.class)
553 .register(new DeviceIdSerializer(), DeviceId.class)
554 .register(new PortNumberSerializer(), PortNumber.class)
555 .register(new DefaultPortSerializer(), DefaultPort.class)
556 .register(new LinkKeySerializer(), LinkKey.class)
557 .register(new ConnectPointSerializer(), ConnectPoint.class)
Brian O'Connor562d9d32016-10-07 12:16:50 -0700558 .register(new FilteredConnectPointSerializer(), FilteredConnectPoint.class)
Yuta HIGUCHI91768e32014-11-22 05:06:35 -0800559 .register(new DefaultLinkSerializer(), DefaultLink.class)
560 .register(new MastershipTermSerializer(), MastershipTerm.class)
561 .register(new HostLocationSerializer(), HostLocation.class)
562 .register(new DefaultOutboundPacketSerializer(), DefaultOutboundPacket.class)
Ayaka Koshibe08e457a2015-06-25 17:11:54 -0700563 .register(new AnnotationsSerializer(), DefaultAnnotations.class)
Jonathan Hart3c259162015-10-21 21:31:19 -0700564 .register(new ExtensionInstructionSerializer(), Instructions.ExtensionInstructionWrapper.class)
Charles Chan14967c22015-12-07 11:11:50 -0800565 .register(new ExtensionCriterionSerializer(), ExtensionCriterion.class)
Thomas Vachuskaeb851cd2016-07-21 15:41:05 -0700566 .register(Region.class)
567 .register(Region.Type.class)
568 .register(RegionId.class)
569 .register(DefaultRegion.class)
Simon Huntd7395c82016-10-20 17:54:01 -0700570 .register(UiTopoLayoutId.class)
Charles Chan14967c22015-12-07 11:11:50 -0800571 .register(ExtensionSelectorType.class)
alshabib880b6442015-11-23 22:13:04 -0800572 .register(ExtensionTreatmentType.class)
Madan Jampanicadd70b2016-02-08 13:45:43 -0800573 .register(TransactionId.class)
Jordan Halterman948d6592017-04-20 17:18:24 -0700574 .register(TransactionLog.class)
Madan Jampani39fff102016-02-14 13:17:28 -0800575 .register(MapUpdate.class)
576 .register(MapUpdate.Type.class)
Madan Jampanie97fec42015-02-17 10:53:42 -0800577 .register(Versioned.class)
Madan Jampani50589ac2015-06-08 11:38:46 -0700578 .register(MapEvent.class)
579 .register(MapEvent.Type.class)
Jonathan Hart46bf89b2017-02-27 15:56:42 -0800580 .register(MultimapEvent.class)
581 .register(MultimapEvent.Type.class)
Madan Jampani50589ac2015-06-08 11:38:46 -0700582 .register(SetEvent.class)
583 .register(SetEvent.Type.class)
Yi Tsengfa394de2017-02-01 11:26:40 -0800584 .register(GroupId.class)
Marc De Leenheerbb382352015-04-23 18:20:34 -0700585 .register(Annotations.class)
Sho SHIMIZU014c33a2015-04-30 11:40:37 -0700586 .register(OduSignalType.class)
Ayaka Koshibebcb02372015-06-01 10:56:42 -0700587 .register(OchSignalType.class)
Sho SHIMIZU014c33a2015-04-30 11:40:37 -0700588 .register(GridType.class)
589 .register(ChannelSpacing.class)
Toru Furusawa72ee30c2016-01-08 13:29:04 -0800590 .register(CltSignalType.class)
Sho SHIMIZU91210a72015-04-29 12:54:28 -0700591 .register(OchSignal.class)
Yafit Hadar5796d972015-10-15 13:16:11 +0300592 .register(OduSignalId.class)
Rimon Ashkenazye2410ff2015-11-10 14:11:08 +0200593 .register(TributarySlot.class)
Rimon Ashkenazy8ebfff02016-02-01 11:56:36 +0200594 .register(OtuSignalType.class)
Michele Santuari4b6019e2014-12-19 11:31:45 +0100595 .register(
sanghob35a6192015-04-01 13:05:26 -0700596 org.onlab.packet.MplsLabel.class,
597 org.onlab.packet.MPLS.class
Marc De Leenheerbb382352015-04-23 18:20:34 -0700598 )
Sho SHIMIZUc0e010dd2016-05-02 14:46:22 -0700599 .register(ClosedOpenRange.class)
Sho SHIMIZUc0e010dd2016-05-02 14:46:22 -0700600 .register(DiscreteResourceCodec.class)
Carmelo Cascone804c0012016-06-23 13:05:40 -0700601 .register(new ImmutableByteSequenceSerializer(), ImmutableByteSequence.class)
Yuta HIGUCHI4859b3a2016-08-16 12:58:23 -0700602 .register(PathIntent.ProtectionType.class)
Yuta HIGUCHI625fb642016-09-01 16:10:24 -0700603 .register(ProtectionConstraint.class)
Andreas Papazois05548962016-11-23 11:36:55 +0200604 .register(ProtectedTransportEndpointDescription.class)
605 .register(ProtectionEndpointIntent.class)
Yuta HIGUCHIb360bb02016-12-08 16:40:48 -0800606 .register(ProtectedTransportIntent.class)
Yuta HIGUCHIeb28a7c2017-01-13 18:59:27 -0800607 .register(MarkerResource.class)
Jordi Ortiz1b1a3b42017-03-03 12:36:54 +0100608 .register(new BitSetSerializer(), BitSet.class)
Michele Santuari38dd82e2017-01-04 09:23:49 +0100609 .register(DomainIntent.class)
Pier Luigi02778b12017-09-11 17:51:13 +0200610 .register(DomainConstraint.class)
Carmelo Cascone72343c52017-09-05 17:37:10 +0200611 .register(
612 // PI model
Carmelo Cascone87892e22017-11-13 16:01:29 -0800613 PiActionGroupType.class,
614 PiActionId.class,
615 PiActionParamId.class,
616 PiActionProfileId.class,
617 PiControlMetadataId.class,
618 PiCounterId.class,
619 PiCounterType.class,
620 PiMatchFieldId.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200621 PiMatchType.class,
Carmelo Cascone87892e22017-11-13 16:01:29 -0800622 PiMeterId.class,
623 PiMeterType.class,
624 PiPacketOperationType.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200625 PiPipeconfId.class,
Carmelo Cascone87892e22017-11-13 16:01:29 -0800626 PiTableId.class,
627 PiTableType.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200628 // PI Runtime
629 PiAction.class,
630 PiActionGroup.class,
631 PiActionGroupId.class,
632 PiActionGroupMember.class,
633 PiActionGroupMemberId.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200634 PiActionParam.class,
Carmelo Cascone87892e22017-11-13 16:01:29 -0800635 PiControlMetadata.class,
636 PiCounterCellData.class,
637 PiCounterCellId.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200638 PiExactFieldMatch.class,
639 PiFieldMatch.class,
Carmelo Cascone87b9b392017-10-02 18:33:20 +0200640 PiGroupKey.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200641 PiLpmFieldMatch.class,
642 PiMatchKey.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200643 PiPacketOperation.class,
644 PiPipeconfConfig.class,
645 PiRangeFieldMatch.class,
646 PiTableAction.class,
647 PiTableEntry.class,
Carmelo Cascone72343c52017-09-05 17:37:10 +0200648 PiTernaryFieldMatch.class,
649 PiValidFieldMatch.class,
650 // Other
651 PiCriterion.class,
652 PiInstruction.class
653 )
Jordan Halterman980a8c12017-09-22 18:01:19 -0700654 .register(Upgrade.class)
655 .register(Upgrade.Status.class)
HIGUCHI Yutab2d0fd82016-05-17 20:34:58 -0700656 .build("API");
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700657
Jonathan Hart679d24d2016-05-13 13:29:53 -0700658 /**
659 * Kryo registration Id for user custom registration.
660 */
661 public static final int BEGIN_USER_CUSTOM_ID = API_MAX_SIZE + 1;
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700662
663 // not to be instantiated
alshabib1aa58142016-02-17 15:37:56 -0800664 private KryoNamespaces() {
665 }
Yuta HIGUCHI03fec1f2014-10-03 09:13:50 -0700666}