Thomas Vachuska | 4f1a60c | 2014-10-28 13:39:07 -0700 | [diff] [blame] | 1 | /* |
Brian O'Connor | a09fe5b | 2017-08-03 21:12:30 -0700 | [diff] [blame] | 2 | * Copyright 2014-present Open Networking Foundation |
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 | ad0c302 | 2017-02-22 14:06:01 -0800 | [diff] [blame] | 18 | import com.google.common.collect.HashMultiset; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 19 | import com.google.common.collect.ImmutableList; |
| 20 | import com.google.common.collect.ImmutableMap; |
| 21 | import com.google.common.collect.ImmutableSet; |
Madan Jampani | 3ca9cb6 | 2015-07-21 11:35:44 -0700 | [diff] [blame] | 22 | import com.google.common.collect.Maps; |
Saurav Das | 9df5b7c | 2017-08-14 16:44:43 -0700 | [diff] [blame] | 23 | import com.google.common.collect.Sets; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 24 | import org.onlab.packet.ChassisId; |
alshabib | caf1ca2 | 2015-06-25 15:18:16 -0700 | [diff] [blame] | 25 | import org.onlab.packet.EthType; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 26 | import org.onlab.packet.Ip4Address; |
| 27 | import org.onlab.packet.Ip4Prefix; |
| 28 | import org.onlab.packet.Ip6Address; |
| 29 | import org.onlab.packet.Ip6Prefix; |
| 30 | import org.onlab.packet.IpAddress; |
| 31 | import org.onlab.packet.IpPrefix; |
| 32 | import org.onlab.packet.MacAddress; |
Hyunsun Moon | cf732fb | 2015-08-22 21:04:23 -0700 | [diff] [blame] | 33 | import org.onlab.packet.TpPort; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 34 | import org.onlab.packet.VlanId; |
Sho SHIMIZU | 63feca7 | 2015-05-07 10:44:25 -0700 | [diff] [blame] | 35 | import org.onlab.util.Bandwidth; |
Sho SHIMIZU | c0e010dd | 2016-05-02 14:46:22 -0700 | [diff] [blame] | 36 | import org.onlab.util.ClosedOpenRange; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 37 | import org.onlab.util.Frequency; |
Carmelo Cascone | 17fc9e4 | 2016-05-31 11:29:21 -0700 | [diff] [blame] | 38 | import org.onlab.util.ImmutableByteSequence; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 39 | import org.onlab.util.KryoNamespace; |
Madan Jampani | 063949f | 2016-01-26 12:10:05 -0800 | [diff] [blame] | 40 | import org.onlab.util.Match; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 41 | import org.onosproject.app.ApplicationState; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 42 | import org.onosproject.cluster.ControllerNode; |
| 43 | import org.onosproject.cluster.DefaultControllerNode; |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 44 | import org.onosproject.cluster.Leader; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 45 | import org.onosproject.cluster.Leadership; |
| 46 | import org.onosproject.cluster.LeadershipEvent; |
| 47 | import org.onosproject.cluster.NodeId; |
| 48 | import org.onosproject.cluster.RoleInfo; |
Changhoon Yoon | 32b9370 | 2015-05-15 04:41:15 +0900 | [diff] [blame] | 49 | import org.onosproject.core.ApplicationRole; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 50 | import org.onosproject.core.DefaultApplication; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 51 | import org.onosproject.core.DefaultApplicationId; |
Yi Tseng | fa394de | 2017-02-01 11:26:40 -0800 | [diff] [blame] | 52 | import org.onosproject.core.GroupId; |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 53 | import org.onosproject.core.Version; |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 54 | import org.onosproject.event.Change; |
Brian O'Connor | ce2d8b5 | 2015-07-29 16:24:13 -0700 | [diff] [blame] | 55 | import org.onosproject.incubator.net.domain.IntentDomainId; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 56 | import org.onosproject.mastership.MastershipTerm; |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 57 | import org.onosproject.net.Annotations; |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 58 | import org.onosproject.net.ChannelSpacing; |
Toru Furusawa | 72ee30c | 2016-01-08 13:29:04 -0800 | [diff] [blame] | 59 | import org.onosproject.net.CltSignalType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 60 | import org.onosproject.net.ConnectPoint; |
| 61 | import org.onosproject.net.DefaultAnnotations; |
| 62 | import org.onosproject.net.DefaultDevice; |
| 63 | import org.onosproject.net.DefaultEdgeLink; |
Madan Jampani | 7058397 | 2015-06-30 11:25:05 -0700 | [diff] [blame] | 64 | import org.onosproject.net.DefaultHost; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 65 | import org.onosproject.net.DefaultLink; |
| 66 | import org.onosproject.net.DefaultPath; |
| 67 | import org.onosproject.net.DefaultPort; |
| 68 | import org.onosproject.net.Device; |
| 69 | import org.onosproject.net.DeviceId; |
| 70 | import org.onosproject.net.Element; |
Jonathan Hart | 26bd813 | 2016-04-13 10:39:55 -0700 | [diff] [blame] | 71 | import org.onosproject.net.EncapsulationType; |
Brian O'Connor | 562d9d3 | 2016-10-07 12:16:50 -0700 | [diff] [blame] | 72 | import org.onosproject.net.FilteredConnectPoint; |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 73 | import org.onosproject.net.GridType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 74 | import org.onosproject.net.HostId; |
| 75 | import org.onosproject.net.HostLocation; |
| 76 | import org.onosproject.net.Link; |
| 77 | import org.onosproject.net.LinkKey; |
Yuta HIGUCHI | eb28a7c | 2017-01-13 18:59:27 -0800 | [diff] [blame] | 78 | import org.onosproject.net.MarkerResource; |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 79 | import org.onosproject.net.OchSignal; |
Ayaka Koshibe | bcb0237 | 2015-06-01 10:56:42 -0700 | [diff] [blame] | 80 | import org.onosproject.net.OchSignalType; |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 81 | import org.onosproject.net.OduSignalId; |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 82 | import org.onosproject.net.OduSignalType; |
Rimon Ashkenazy | 8ebfff0 | 2016-02-01 11:56:36 +0200 | [diff] [blame] | 83 | import org.onosproject.net.OtuSignalType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 84 | import org.onosproject.net.Port; |
| 85 | import org.onosproject.net.PortNumber; |
Luca Prete | 670ac5d | 2017-02-03 15:55:43 -0800 | [diff] [blame] | 86 | import org.onosproject.net.ResourceGroup; |
Rimon Ashkenazy | e2410ff | 2015-11-10 14:11:08 +0200 | [diff] [blame] | 87 | import org.onosproject.net.TributarySlot; |
Andreas Papazois | 0554896 | 2016-11-23 11:36:55 +0200 | [diff] [blame] | 88 | import org.onosproject.net.behaviour.protection.ProtectedTransportEndpointDescription; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 89 | import org.onosproject.net.device.DefaultDeviceDescription; |
| 90 | import org.onosproject.net.device.DefaultPortDescription; |
Thomas Vachuska | fdbc4c2 | 2015-05-29 15:53:01 -0700 | [diff] [blame] | 91 | import org.onosproject.net.device.DefaultPortStatistics; |
Thomas Vachuska | fdbc4c2 | 2015-05-29 15:53:01 -0700 | [diff] [blame] | 92 | import org.onosproject.net.device.PortStatistics; |
Michele Santuari | 38dd82e | 2017-01-04 09:23:49 +0100 | [diff] [blame] | 93 | import org.onosproject.net.domain.DomainIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 94 | import org.onosproject.net.flow.CompletedBatchOperation; |
| 95 | import org.onosproject.net.flow.DefaultFlowEntry; |
| 96 | import org.onosproject.net.flow.DefaultFlowRule; |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 97 | import org.onosproject.net.flow.DefaultTableStatisticsEntry; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 98 | import org.onosproject.net.flow.DefaultTrafficSelector; |
| 99 | import org.onosproject.net.flow.DefaultTrafficTreatment; |
| 100 | import org.onosproject.net.flow.FlowEntry; |
| 101 | import org.onosproject.net.flow.FlowId; |
Murat Parlakisik | c6759e8 | 2016-06-29 03:22:22 -0700 | [diff] [blame] | 102 | import org.onosproject.net.flow.FlowRule; |
Ray Milkey | 7bf273c | 2017-09-27 16:15:15 -0700 | [diff] [blame] | 103 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchEntry; |
| 104 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchEvent; |
| 105 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchOperation; |
| 106 | import org.onosproject.net.flow.oldbatch.FlowRuleBatchRequest; |
Madan Jampani | 87e276b | 2015-06-02 10:49:47 -0700 | [diff] [blame] | 107 | import org.onosproject.net.flow.FlowRuleEvent; |
jcc | 3d4e14a | 2015-04-21 11:32:05 +0800 | [diff] [blame] | 108 | import org.onosproject.net.flow.FlowRuleExtPayLoad; |
Carmelo Cascone | 4160574 | 2017-06-19 15:46:44 +0900 | [diff] [blame] | 109 | import org.onosproject.net.flow.IndexTableId; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 110 | import org.onosproject.net.flow.StoredFlowEntry; |
Carmelo Cascone | 4160574 | 2017-06-19 15:46:44 +0900 | [diff] [blame] | 111 | import org.onosproject.net.flow.TableId; |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 112 | import org.onosproject.net.flow.TableStatisticsEntry; |
Hyunsun Moon | c8fe98b | 2016-01-11 00:01:46 -0800 | [diff] [blame] | 113 | import org.onosproject.net.flow.criteria.ArpHaCriterion; |
| 114 | import org.onosproject.net.flow.criteria.ArpOpCriterion; |
| 115 | import org.onosproject.net.flow.criteria.ArpPaCriterion; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 116 | import org.onosproject.net.flow.criteria.Criterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 117 | import org.onosproject.net.flow.criteria.EthCriterion; |
| 118 | import org.onosproject.net.flow.criteria.EthTypeCriterion; |
Charles Chan | 14967c2 | 2015-12-07 11:11:50 -0800 | [diff] [blame] | 119 | import org.onosproject.net.flow.criteria.ExtensionCriterion; |
| 120 | import org.onosproject.net.flow.criteria.ExtensionSelectorType; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 121 | import org.onosproject.net.flow.criteria.IPCriterion; |
| 122 | import org.onosproject.net.flow.criteria.IPDscpCriterion; |
| 123 | import org.onosproject.net.flow.criteria.IPEcnCriterion; |
| 124 | import org.onosproject.net.flow.criteria.IPProtocolCriterion; |
| 125 | import org.onosproject.net.flow.criteria.IPv6ExthdrFlagsCriterion; |
| 126 | import org.onosproject.net.flow.criteria.IPv6FlowLabelCriterion; |
| 127 | import org.onosproject.net.flow.criteria.IPv6NDLinkLayerAddressCriterion; |
| 128 | import org.onosproject.net.flow.criteria.IPv6NDTargetAddressCriterion; |
| 129 | import org.onosproject.net.flow.criteria.IcmpCodeCriterion; |
| 130 | import org.onosproject.net.flow.criteria.IcmpTypeCriterion; |
| 131 | import org.onosproject.net.flow.criteria.Icmpv6CodeCriterion; |
| 132 | import org.onosproject.net.flow.criteria.Icmpv6TypeCriterion; |
| 133 | import org.onosproject.net.flow.criteria.LambdaCriterion; |
| 134 | import org.onosproject.net.flow.criteria.MetadataCriterion; |
Charles Chan | 7ba33f4 | 2015-12-15 19:27:30 -0800 | [diff] [blame] | 135 | import org.onosproject.net.flow.criteria.MplsBosCriterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 136 | import org.onosproject.net.flow.criteria.MplsCriterion; |
Sho SHIMIZU | 084c4ca | 2015-05-04 11:52:51 -0700 | [diff] [blame] | 137 | import org.onosproject.net.flow.criteria.OchSignalCriterion; |
Sho SHIMIZU | b5e6de6 | 2015-05-04 12:13:44 -0700 | [diff] [blame] | 138 | import org.onosproject.net.flow.criteria.OchSignalTypeCriterion; |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 139 | import org.onosproject.net.flow.criteria.OduSignalIdCriterion; |
| 140 | import org.onosproject.net.flow.criteria.OduSignalTypeCriterion; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 141 | import org.onosproject.net.flow.criteria.PiCriterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 142 | import org.onosproject.net.flow.criteria.PortCriterion; |
| 143 | import org.onosproject.net.flow.criteria.SctpPortCriterion; |
| 144 | import org.onosproject.net.flow.criteria.TcpPortCriterion; |
Hyunsun Moon | a08c5d0 | 2015-07-14 17:53:00 -0700 | [diff] [blame] | 145 | import org.onosproject.net.flow.criteria.TunnelIdCriterion; |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 146 | import org.onosproject.net.flow.criteria.UdpPortCriterion; |
| 147 | import org.onosproject.net.flow.criteria.VlanIdCriterion; |
| 148 | import org.onosproject.net.flow.criteria.VlanPcpCriterion; |
alshabib | 880b644 | 2015-11-23 22:13:04 -0800 | [diff] [blame] | 149 | import org.onosproject.net.flow.instructions.ExtensionTreatmentType; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 150 | import org.onosproject.net.flow.instructions.Instructions; |
| 151 | import org.onosproject.net.flow.instructions.L0ModificationInstruction; |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 152 | import org.onosproject.net.flow.instructions.L1ModificationInstruction; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 153 | import org.onosproject.net.flow.instructions.L2ModificationInstruction; |
| 154 | import org.onosproject.net.flow.instructions.L3ModificationInstruction; |
Hyunsun Moon | c8bd97c | 2015-07-18 22:47:33 -0700 | [diff] [blame] | 155 | import org.onosproject.net.flow.instructions.L4ModificationInstruction; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 156 | import org.onosproject.net.flow.instructions.PiInstruction; |
Charles Chan | c72271f | 2016-04-05 15:15:27 -0700 | [diff] [blame] | 157 | import org.onosproject.net.flowobjective.DefaultFilteringObjective; |
| 158 | import org.onosproject.net.flowobjective.DefaultForwardingObjective; |
| 159 | import org.onosproject.net.flowobjective.DefaultNextObjective; |
| 160 | import org.onosproject.net.flowobjective.FilteringObjective; |
| 161 | import org.onosproject.net.flowobjective.ForwardingObjective; |
| 162 | import org.onosproject.net.flowobjective.NextObjective; |
| 163 | import org.onosproject.net.flowobjective.Objective; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 164 | import org.onosproject.net.host.DefaultHostDescription; |
| 165 | import org.onosproject.net.host.HostDescription; |
| 166 | import org.onosproject.net.intent.ConnectivityIntent; |
Jonathan Hart | 6552b8d | 2016-04-12 14:21:50 -0700 | [diff] [blame] | 167 | import org.onosproject.net.intent.FlowObjectiveIntent; |
Brian O'Connor | a751537 | 2015-03-25 14:45:34 -0700 | [diff] [blame] | 168 | import org.onosproject.net.intent.FlowRuleIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 169 | import org.onosproject.net.intent.HostToHostIntent; |
| 170 | import org.onosproject.net.intent.Intent; |
| 171 | import org.onosproject.net.intent.IntentId; |
| 172 | import org.onosproject.net.intent.IntentOperation; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 173 | import org.onosproject.net.intent.IntentState; |
Jonathan Hart | 5ec32ba | 2015-02-05 13:33:58 -0800 | [diff] [blame] | 174 | import org.onosproject.net.intent.Key; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 175 | import org.onosproject.net.intent.LinkCollectionIntent; |
| 176 | import org.onosproject.net.intent.MultiPointToSinglePointIntent; |
Marc De Leenheer | 8c2caac | 2015-05-28 16:37:33 -0700 | [diff] [blame] | 177 | import org.onosproject.net.intent.OpticalCircuitIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 178 | import org.onosproject.net.intent.OpticalConnectivityIntent; |
Rimon Ashkenazy | 27438ff | 2016-03-22 15:57:45 +0200 | [diff] [blame] | 179 | import org.onosproject.net.intent.OpticalOduIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 180 | import org.onosproject.net.intent.OpticalPathIntent; |
| 181 | import org.onosproject.net.intent.PathIntent; |
| 182 | import org.onosproject.net.intent.PointToPointIntent; |
Yuta HIGUCHI | b360bb0 | 2016-12-08 16:40:48 -0800 | [diff] [blame] | 183 | import org.onosproject.net.intent.ProtectedTransportIntent; |
Andreas Papazois | 0554896 | 2016-11-23 11:36:55 +0200 | [diff] [blame] | 184 | import org.onosproject.net.intent.ProtectionEndpointIntent; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 185 | import org.onosproject.net.intent.SinglePointToMultiPointIntent; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 186 | import org.onosproject.net.intent.constraint.AnnotationConstraint; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 187 | import org.onosproject.net.intent.constraint.BandwidthConstraint; |
| 188 | import org.onosproject.net.intent.constraint.BooleanConstraint; |
Pier Luigi | 02778b1 | 2017-09-11 17:51:13 +0200 | [diff] [blame] | 189 | import org.onosproject.net.intent.constraint.DomainConstraint; |
Jonathan Hart | 26bd813 | 2016-04-13 10:39:55 -0700 | [diff] [blame] | 190 | import org.onosproject.net.intent.constraint.EncapsulationConstraint; |
jaegonkim | 7e87663 | 2017-01-25 06:01:49 +0900 | [diff] [blame] | 191 | import org.onosproject.net.intent.constraint.HashedPathSelectionConstraint; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 192 | import org.onosproject.net.intent.constraint.LatencyConstraint; |
| 193 | import org.onosproject.net.intent.constraint.LinkTypeConstraint; |
| 194 | import org.onosproject.net.intent.constraint.ObstacleConstraint; |
Jonathan Hart | 96c5a4a | 2015-07-31 14:23:33 -0700 | [diff] [blame] | 195 | import org.onosproject.net.intent.constraint.PartialFailureConstraint; |
Yuta HIGUCHI | 625fb64 | 2016-09-01 16:10:24 -0700 | [diff] [blame] | 196 | import org.onosproject.net.intent.constraint.ProtectionConstraint; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 197 | import org.onosproject.net.intent.constraint.WaypointConstraint; |
| 198 | import org.onosproject.net.link.DefaultLinkDescription; |
alshabib | 10c810b | 2015-08-18 16:59:04 -0700 | [diff] [blame] | 199 | import org.onosproject.net.meter.MeterId; |
Jian Li | 11260a0 | 2016-05-19 13:07:22 -0700 | [diff] [blame] | 200 | import org.onosproject.net.packet.DefaultOutboundPacket; |
| 201 | import org.onosproject.net.packet.DefaultPacketRequest; |
| 202 | import org.onosproject.net.packet.PacketPriority; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 203 | import org.onosproject.net.pi.model.PiMatchType; |
| 204 | import org.onosproject.net.pi.model.PiPipeconfId; |
| 205 | import org.onosproject.net.pi.runtime.PiAction; |
| 206 | import org.onosproject.net.pi.runtime.PiActionGroup; |
| 207 | import org.onosproject.net.pi.runtime.PiActionGroupId; |
| 208 | import org.onosproject.net.pi.runtime.PiActionGroupMember; |
| 209 | import org.onosproject.net.pi.runtime.PiActionGroupMemberId; |
| 210 | import org.onosproject.net.pi.runtime.PiActionId; |
| 211 | import org.onosproject.net.pi.runtime.PiActionParam; |
| 212 | import org.onosproject.net.pi.runtime.PiActionParamId; |
| 213 | import org.onosproject.net.pi.runtime.PiExactFieldMatch; |
| 214 | import org.onosproject.net.pi.runtime.PiFieldMatch; |
Yi Tseng | 82512da | 2017-08-16 19:46:36 -0700 | [diff] [blame] | 215 | import org.onosproject.net.pi.runtime.PiActionProfileId; |
Carmelo Cascone | 87b9b39 | 2017-10-02 18:33:20 +0200 | [diff] [blame^] | 216 | import org.onosproject.net.pi.runtime.PiGroupKey; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 217 | import org.onosproject.net.pi.runtime.PiHeaderFieldId; |
| 218 | import org.onosproject.net.pi.runtime.PiLpmFieldMatch; |
| 219 | import org.onosproject.net.pi.runtime.PiMatchKey; |
| 220 | import org.onosproject.net.pi.runtime.PiPacketMetadata; |
| 221 | import org.onosproject.net.pi.runtime.PiPacketMetadataId; |
| 222 | import org.onosproject.net.pi.runtime.PiPacketOperation; |
| 223 | import org.onosproject.net.pi.runtime.PiPipeconfConfig; |
| 224 | import org.onosproject.net.pi.runtime.PiRangeFieldMatch; |
| 225 | import org.onosproject.net.pi.runtime.PiTableAction; |
| 226 | import org.onosproject.net.pi.runtime.PiTableEntry; |
Carmelo Cascone | 4160574 | 2017-06-19 15:46:44 +0900 | [diff] [blame] | 227 | import org.onosproject.net.pi.runtime.PiTableId; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 228 | import org.onosproject.net.pi.runtime.PiTernaryFieldMatch; |
| 229 | import org.onosproject.net.pi.runtime.PiValidFieldMatch; |
Jian Li | 11260a0 | 2016-05-19 13:07:22 -0700 | [diff] [blame] | 230 | import org.onosproject.net.provider.ProviderId; |
Thomas Vachuska | eb851cd | 2016-07-21 15:41:05 -0700 | [diff] [blame] | 231 | import org.onosproject.net.region.DefaultRegion; |
| 232 | import org.onosproject.net.region.Region; |
| 233 | import org.onosproject.net.region.RegionId; |
Sho SHIMIZU | e18cb12 | 2016-02-22 21:04:56 -0800 | [diff] [blame] | 234 | import org.onosproject.net.resource.ContinuousResource; |
| 235 | import org.onosproject.net.resource.ContinuousResourceId; |
| 236 | import org.onosproject.net.resource.DiscreteResource; |
Sho SHIMIZU | c0e010dd | 2016-05-02 14:46:22 -0700 | [diff] [blame] | 237 | import org.onosproject.net.resource.DiscreteResourceCodec; |
Sho SHIMIZU | e18cb12 | 2016-02-22 21:04:56 -0800 | [diff] [blame] | 238 | import org.onosproject.net.resource.DiscreteResourceId; |
| 239 | import org.onosproject.net.resource.ResourceAllocation; |
Naoki Shiota | bd1974c | 2016-04-29 18:44:17 -0700 | [diff] [blame] | 240 | import org.onosproject.net.resource.ResourceConsumerId; |
Changhoon Yoon | e71dfa4 | 2015-12-04 21:49:25 +0900 | [diff] [blame] | 241 | import org.onosproject.security.Permission; |
Brian O'Connor | abafb50 | 2014-12-02 22:26:20 -0800 | [diff] [blame] | 242 | import org.onosproject.store.Timestamp; |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 243 | import org.onosproject.store.primitives.MapUpdate; |
Madan Jampani | cadd70b | 2016-02-08 13:45:43 -0800 | [diff] [blame] | 244 | import org.onosproject.store.primitives.TransactionId; |
Madan Jampani | 50589ac | 2015-06-08 11:38:46 -0700 | [diff] [blame] | 245 | import org.onosproject.store.service.MapEvent; |
Jonathan Hart | 46bf89b | 2017-02-27 15:56:42 -0800 | [diff] [blame] | 246 | import org.onosproject.store.service.MultimapEvent; |
Madan Jampani | 50589ac | 2015-06-08 11:38:46 -0700 | [diff] [blame] | 247 | import org.onosproject.store.service.SetEvent; |
Madan Jampani | 35708a9 | 2016-07-06 10:48:19 -0700 | [diff] [blame] | 248 | import org.onosproject.store.service.Task; |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 249 | import org.onosproject.store.service.TransactionLog; |
Madan Jampani | e97fec4 | 2015-02-17 10:53:42 -0800 | [diff] [blame] | 250 | import org.onosproject.store.service.Versioned; |
Madan Jampani | 35708a9 | 2016-07-06 10:48:19 -0700 | [diff] [blame] | 251 | import org.onosproject.store.service.WorkQueueStats; |
Simon Hunt | d7395c8 | 2016-10-20 17:54:01 -0700 | [diff] [blame] | 252 | import org.onosproject.ui.model.topo.UiTopoLayoutId; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 253 | |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 254 | import java.net.URI; |
| 255 | import java.time.Duration; |
| 256 | import java.util.ArrayList; |
| 257 | import java.util.Arrays; |
Jordi Ortiz | 1b1a3b4 | 2017-03-03 12:36:54 +0100 | [diff] [blame] | 258 | import java.util.BitSet; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 259 | import java.util.Collections; |
| 260 | import java.util.HashMap; |
| 261 | import java.util.HashSet; |
Sho SHIMIZU | 6c9e33a | 2016-01-07 18:45:27 -0800 | [diff] [blame] | 262 | import java.util.LinkedHashSet; |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 263 | import java.util.LinkedList; |
| 264 | import java.util.Optional; |
Madan Jampani | 86940d9 | 2015-05-06 11:47:57 -0700 | [diff] [blame] | 265 | import java.util.concurrent.ConcurrentHashMap; |
| 266 | import java.util.concurrent.CopyOnWriteArraySet; |
Madan Jampani | 6db0b44 | 2015-07-07 20:27:59 -0700 | [diff] [blame] | 267 | import java.util.concurrent.atomic.AtomicBoolean; |
| 268 | import java.util.concurrent.atomic.AtomicInteger; |
| 269 | import java.util.concurrent.atomic.AtomicLong; |
Yuta HIGUCHI | 47c4088 | 2014-10-10 18:44:37 -0700 | [diff] [blame] | 270 | |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 271 | public final class KryoNamespaces { |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 272 | |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 273 | public static final int BASIC_MAX_SIZE = 50; |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 274 | public static final KryoNamespace BASIC = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 275 | .nextId(KryoNamespace.FLOATING_ID) |
| 276 | .register(byte[].class) |
Madan Jampani | 6db0b44 | 2015-07-07 20:27:59 -0700 | [diff] [blame] | 277 | .register(AtomicBoolean.class) |
| 278 | .register(AtomicInteger.class) |
| 279 | .register(AtomicLong.class) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 280 | .register(new ImmutableListSerializer(), |
| 281 | ImmutableList.class, |
| 282 | ImmutableList.of(1).getClass(), |
Jimmy Jin | e9b7a02 | 2016-08-12 16:56:48 -0700 | [diff] [blame] | 283 | ImmutableList.of(1, 2).getClass(), |
| 284 | ImmutableList.of(1, 2, 3).subList(1, 3).getClass()) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 285 | .register(new ImmutableSetSerializer(), |
| 286 | ImmutableSet.class, |
| 287 | ImmutableSet.of().getClass(), |
| 288 | ImmutableSet.of(1).getClass(), |
| 289 | ImmutableSet.of(1, 2).getClass()) |
| 290 | .register(new ImmutableMapSerializer(), |
| 291 | ImmutableMap.class, |
| 292 | ImmutableMap.of().getClass(), |
| 293 | ImmutableMap.of("a", 1).getClass(), |
| 294 | ImmutableMap.of("R", 2, "D", 2).getClass()) |
Madan Jampani | 10666e5 | 2016-02-11 16:46:42 -0800 | [diff] [blame] | 295 | .register(Collections.unmodifiableSet(Collections.emptySet()).getClass()) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 296 | .register(HashMap.class) |
Madan Jampani | 86940d9 | 2015-05-06 11:47:57 -0700 | [diff] [blame] | 297 | .register(ConcurrentHashMap.class) |
| 298 | .register(CopyOnWriteArraySet.class) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 299 | .register(ArrayList.class, |
| 300 | LinkedList.class, |
Sho SHIMIZU | 6c9e33a | 2016-01-07 18:45:27 -0800 | [diff] [blame] | 301 | HashSet.class, |
| 302 | LinkedHashSet.class |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 303 | ) |
Jonathan Hart | ad0c302 | 2017-02-22 14:06:01 -0800 | [diff] [blame] | 304 | .register(HashMultiset.class) |
Saurav Das | 9df5b7c | 2017-08-14 16:44:43 -0700 | [diff] [blame] | 305 | .register(Sets.class) |
Madan Jampani | 3ca9cb6 | 2015-07-21 11:35:44 -0700 | [diff] [blame] | 306 | .register(Maps.immutableEntry("a", "b").getClass()) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 307 | .register(new ArraysAsListSerializer(), Arrays.asList().getClass()) |
| 308 | .register(Collections.singletonList(1).getClass()) |
| 309 | .register(Duration.class) |
Yuta HIGUCHI | ae1d210 | 2014-11-25 19:26:01 -0800 | [diff] [blame] | 310 | .register(Collections.emptySet().getClass()) |
Sho SHIMIZU | 166e61e | 2015-01-21 18:07:12 -0800 | [diff] [blame] | 311 | .register(Optional.class) |
Jonathan Hart | 4572785 | 2015-01-28 13:35:54 -0800 | [diff] [blame] | 312 | .register(Collections.emptyList().getClass()) |
Marc De Leenheer | 4a1c1fa | 2015-06-01 18:08:56 -0700 | [diff] [blame] | 313 | .register(Collections.singleton(Object.class).getClass()) |
Jian Li | 83fa041 | 2016-05-06 12:33:49 -0700 | [diff] [blame] | 314 | .register(int[].class) |
| 315 | .register(long[].class) |
| 316 | .register(short[].class) |
| 317 | .register(double[].class) |
| 318 | .register(float[].class) |
| 319 | .register(char[].class) |
| 320 | .register(String[].class) |
| 321 | .register(boolean[].class) |
HIGUCHI Yuta | b2d0fd8 | 2016-05-17 20:34:58 -0700 | [diff] [blame] | 322 | .build("BASIC"); |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 323 | |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 324 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 325 | * KryoNamespace which can serialize ON.lab misc classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 326 | */ |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 327 | public static final int MISC_MAX_SIZE = 30; |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 328 | public static final KryoNamespace MISC = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 329 | .nextId(KryoNamespace.FLOATING_ID) |
| 330 | .register(new IpPrefixSerializer(), IpPrefix.class) |
| 331 | .register(new Ip4PrefixSerializer(), Ip4Prefix.class) |
| 332 | .register(new Ip6PrefixSerializer(), Ip6Prefix.class) |
| 333 | .register(new IpAddressSerializer(), IpAddress.class) |
| 334 | .register(new Ip4AddressSerializer(), Ip4Address.class) |
| 335 | .register(new Ip6AddressSerializer(), Ip6Address.class) |
| 336 | .register(new MacAddressSerializer(), MacAddress.class) |
Madan Jampani | 063949f | 2016-01-26 12:10:05 -0800 | [diff] [blame] | 337 | .register(Match.class) |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 338 | .register(VlanId.class) |
Sho SHIMIZU | dee7871 | 2015-04-30 09:33:52 -0700 | [diff] [blame] | 339 | .register(Frequency.class) |
Sho SHIMIZU | 63feca7 | 2015-05-07 10:44:25 -0700 | [diff] [blame] | 340 | .register(Bandwidth.class) |
Sho SHIMIZU | 31f37ed | 2016-01-08 18:45:54 -0800 | [diff] [blame] | 341 | .register(Bandwidth.bps(1L).getClass()) |
| 342 | .register(Bandwidth.bps(1.0).getClass()) |
HIGUCHI Yuta | b2d0fd8 | 2016-05-17 20:34:58 -0700 | [diff] [blame] | 343 | .build("MISC"); |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 344 | |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 345 | /** |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 346 | * KryoNamespace which can serialize API bundle classes. |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 347 | */ |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 348 | public static final int API_MAX_SIZE = 499; |
Yuta HIGUCHI | 8d143d2 | 2014-10-19 23:15:09 -0700 | [diff] [blame] | 349 | public static final KryoNamespace API = KryoNamespace.newBuilder() |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 350 | .nextId(KryoNamespace.INITIAL_ID) |
Yuta HIGUCHI | 1aa249c | 2014-11-05 17:40:28 -0800 | [diff] [blame] | 351 | .register(BASIC) |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 352 | .nextId(KryoNamespace.INITIAL_ID + BASIC_MAX_SIZE) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 353 | .register(MISC) |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 354 | .nextId(KryoNamespace.INITIAL_ID + BASIC_MAX_SIZE + MISC_MAX_SIZE) |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 355 | .register( |
alshabib | 10c810b | 2015-08-18 16:59:04 -0700 | [diff] [blame] | 356 | Instructions.MeterInstruction.class, |
| 357 | MeterId.class, |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 358 | Version.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 359 | ControllerNode.State.class, |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 360 | ApplicationState.class, |
Changhoon Yoon | 32b9370 | 2015-05-15 04:41:15 +0900 | [diff] [blame] | 361 | ApplicationRole.class, |
Thomas Vachuska | 90b453f | 2015-01-30 18:57:14 -0800 | [diff] [blame] | 362 | DefaultApplication.class, |
Changhoon Yoon | e71dfa4 | 2015-12-04 21:49:25 +0900 | [diff] [blame] | 363 | Permission.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 364 | Device.Type.class, |
Thomas Vachuska | d16ce18 | 2014-10-29 17:25:29 -0700 | [diff] [blame] | 365 | Port.Type.class, |
alshabib | 7911a05 | 2014-10-16 17:49:37 -0700 | [diff] [blame] | 366 | ChassisId.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 367 | DefaultControllerNode.class, |
| 368 | DefaultDevice.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 369 | DefaultDeviceDescription.class, |
Madan Jampani | 7058397 | 2015-06-30 11:25:05 -0700 | [diff] [blame] | 370 | DefaultHost.class, |
Madan Jampani | 2ff0559 | 2014-10-10 15:42:47 -0700 | [diff] [blame] | 371 | DefaultLinkDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 372 | Port.class, |
Madan Jampani | 53e44e6 | 2014-10-07 12:39:51 -0700 | [diff] [blame] | 373 | DefaultPortDescription.class, |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 374 | Element.class, |
Yuta HIGUCHI | 9ee60f6 | 2014-10-09 10:00:01 -0700 | [diff] [blame] | 375 | Link.Type.class, |
Thomas Vachuska | 57126fe | 2014-11-11 17:13:24 -0800 | [diff] [blame] | 376 | Link.State.class, |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 377 | Timestamp.class, |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 378 | Change.class, |
| 379 | Leader.class, |
Madan Jampani | 1ee9178 | 2014-11-20 20:24:24 -0800 | [diff] [blame] | 380 | Leadership.class, |
| 381 | LeadershipEvent.class, |
| 382 | LeadershipEvent.Type.class, |
Madan Jampani | 35708a9 | 2016-07-06 10:48:19 -0700 | [diff] [blame] | 383 | Task.class, |
| 384 | WorkQueueStats.class, |
Yuta HIGUCHI | 5fa3dc0 | 2014-10-15 17:08:13 -0700 | [diff] [blame] | 385 | HostId.class, |
| 386 | HostDescription.class, |
Madan Jampani | 38b250d | 2014-10-17 11:02:38 -0700 | [diff] [blame] | 387 | DefaultHostDescription.class, |
Madan Jampani | 117aaae | 2014-10-23 10:04:05 -0700 | [diff] [blame] | 388 | DefaultFlowEntry.class, |
| 389 | StoredFlowEntry.class, |
Yuta HIGUCHI | 2fcfde9 | 2014-10-20 18:37:14 -0700 | [diff] [blame] | 390 | DefaultFlowRule.class, |
Carmelo Cascone | 4160574 | 2017-06-19 15:46:44 +0900 | [diff] [blame] | 391 | TableId.class, |
| 392 | IndexTableId.class, |
Murat Parlakisik | c6759e8 | 2016-06-29 03:22:22 -0700 | [diff] [blame] | 393 | FlowRule.FlowRemoveReason.class, |
alshabib | 4294778 | 2015-03-31 14:59:06 -0700 | [diff] [blame] | 394 | DefaultPacketRequest.class, |
| 395 | PacketPriority.class, |
alshabib | f6c2ede | 2014-10-22 23:31:50 -0700 | [diff] [blame] | 396 | FlowEntry.FlowEntryState.class, |
Ray Milkey | 97db350 | 2016-12-07 14:46:34 -0800 | [diff] [blame] | 397 | FlowEntry.FlowLiveType.class, |
Yuta HIGUCHI | 2809bf3 | 2014-10-20 22:44:12 -0700 | [diff] [blame] | 398 | FlowId.class, |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 399 | DefaultTrafficSelector.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 400 | PortCriterion.class, |
| 401 | MetadataCriterion.class, |
| 402 | EthCriterion.class, |
alshabib | caf1ca2 | 2015-06-25 15:18:16 -0700 | [diff] [blame] | 403 | EthType.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 404 | EthTypeCriterion.class, |
| 405 | VlanIdCriterion.class, |
| 406 | VlanPcpCriterion.class, |
| 407 | IPDscpCriterion.class, |
| 408 | IPEcnCriterion.class, |
| 409 | IPProtocolCriterion.class, |
| 410 | IPCriterion.class, |
Hyunsun Moon | cf732fb | 2015-08-22 21:04:23 -0700 | [diff] [blame] | 411 | TpPort.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 412 | TcpPortCriterion.class, |
| 413 | UdpPortCriterion.class, |
| 414 | SctpPortCriterion.class, |
| 415 | IcmpTypeCriterion.class, |
| 416 | IcmpCodeCriterion.class, |
| 417 | IPv6FlowLabelCriterion.class, |
| 418 | Icmpv6TypeCriterion.class, |
| 419 | Icmpv6CodeCriterion.class, |
| 420 | IPv6NDTargetAddressCriterion.class, |
| 421 | IPv6NDLinkLayerAddressCriterion.class, |
| 422 | MplsCriterion.class, |
Charles Chan | 7ba33f4 | 2015-12-15 19:27:30 -0800 | [diff] [blame] | 423 | MplsBosCriterion.class, |
Hyunsun Moon | a08c5d0 | 2015-07-14 17:53:00 -0700 | [diff] [blame] | 424 | TunnelIdCriterion.class, |
Sho SHIMIZU | fbc80e5 | 2015-04-28 10:41:58 -0700 | [diff] [blame] | 425 | IPv6ExthdrFlagsCriterion.class, |
| 426 | LambdaCriterion.class, |
Sho SHIMIZU | 084c4ca | 2015-05-04 11:52:51 -0700 | [diff] [blame] | 427 | OchSignalCriterion.class, |
Sho SHIMIZU | b5e6de6 | 2015-05-04 12:13:44 -0700 | [diff] [blame] | 428 | OchSignalTypeCriterion.class, |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 429 | OduSignalIdCriterion.class, |
| 430 | OduSignalTypeCriterion.class, |
Hyunsun Moon | c8fe98b | 2016-01-11 00:01:46 -0800 | [diff] [blame] | 431 | ArpOpCriterion.class, |
| 432 | ArpHaCriterion.class, |
| 433 | ArpPaCriterion.class, |
Yuta HIGUCHI | 85d58d1 | 2014-10-20 23:59:44 -0700 | [diff] [blame] | 434 | Criterion.class, |
| 435 | Criterion.Type.class, |
| 436 | DefaultTrafficTreatment.class, |
Charles Chan | 7efabeb | 2015-09-28 15:12:19 -0700 | [diff] [blame] | 437 | Instructions.NoActionInstruction.class, |
Yuta HIGUCHI | 40d0177 | 2014-10-21 00:08:44 -0700 | [diff] [blame] | 438 | Instructions.OutputInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 439 | Instructions.GroupInstruction.class, |
Steffen Gebert | 7c446e4 | 2016-06-21 23:22:20 +0200 | [diff] [blame] | 440 | Instructions.SetQueueInstruction.class, |
Srikanth Vavilapalli | 2318191 | 2015-05-04 09:48:09 -0700 | [diff] [blame] | 441 | Instructions.TableTypeTransition.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 442 | L0ModificationInstruction.class, |
| 443 | L0ModificationInstruction.L0SubType.class, |
Sho SHIMIZU | c682709 | 2015-05-05 17:58:34 -0700 | [diff] [blame] | 444 | L0ModificationInstruction.ModOchSignalInstruction.class, |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 445 | L1ModificationInstruction.class, |
| 446 | L1ModificationInstruction.L1SubType.class, |
| 447 | L1ModificationInstruction.ModOduSignalIdInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 448 | L2ModificationInstruction.class, |
| 449 | L2ModificationInstruction.L2SubType.class, |
| 450 | L2ModificationInstruction.ModEtherInstruction.class, |
Jian Li | 11260a0 | 2016-05-19 13:07:22 -0700 | [diff] [blame] | 451 | L2ModificationInstruction.ModMplsHeaderInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 452 | L2ModificationInstruction.ModVlanIdInstruction.class, |
| 453 | L2ModificationInstruction.ModVlanPcpInstruction.class, |
Jian Li | 11260a0 | 2016-05-19 13:07:22 -0700 | [diff] [blame] | 454 | L2ModificationInstruction.ModVlanHeaderInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 455 | L2ModificationInstruction.ModMplsLabelInstruction.class, |
Saurav Das | 8a0732e | 2015-11-20 15:27:53 -0800 | [diff] [blame] | 456 | L2ModificationInstruction.ModMplsBosInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 457 | L2ModificationInstruction.ModMplsTtlInstruction.class, |
Hyunsun Moon | a08c5d0 | 2015-07-14 17:53:00 -0700 | [diff] [blame] | 458 | L2ModificationInstruction.ModTunnelIdInstruction.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 459 | L3ModificationInstruction.class, |
| 460 | L3ModificationInstruction.L3SubType.class, |
| 461 | L3ModificationInstruction.ModIPInstruction.class, |
Pavlin Radoslavov | febe82c | 2015-02-11 19:08:15 -0800 | [diff] [blame] | 462 | L3ModificationInstruction.ModIPv6FlowLabelInstruction.class, |
Pavlin Radoslavov | 1d21866 | 2015-02-13 11:34:30 -0800 | [diff] [blame] | 463 | L3ModificationInstruction.ModTtlInstruction.class, |
Hyunsun Moon | c8bd97c | 2015-07-18 22:47:33 -0700 | [diff] [blame] | 464 | L4ModificationInstruction.class, |
| 465 | L4ModificationInstruction.L4SubType.class, |
| 466 | L4ModificationInstruction.ModTransportPortInstruction.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 467 | RoleInfo.class, |
Brian O'Connor | 72cb19a | 2015-01-16 16:14:41 -0800 | [diff] [blame] | 468 | FlowRuleBatchEvent.class, |
| 469 | FlowRuleBatchEvent.Type.class, |
| 470 | FlowRuleBatchRequest.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 471 | FlowRuleBatchOperation.class, |
Madan Jampani | 87e276b | 2015-06-02 10:49:47 -0700 | [diff] [blame] | 472 | FlowRuleEvent.class, |
| 473 | FlowRuleEvent.Type.class, |
Yuta HIGUCHI | 9def047 | 2014-10-23 15:51:10 -0700 | [diff] [blame] | 474 | CompletedBatchOperation.class, |
| 475 | FlowRuleBatchEntry.class, |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 476 | FlowRuleBatchEntry.FlowRuleOperation.class, |
| 477 | IntentId.class, |
| 478 | IntentState.class, |
Brian O'Connor | 4e6c17d | 2015-02-19 11:40:05 -0800 | [diff] [blame] | 479 | //Key.class, is abstract |
| 480 | Key.of(1L, new DefaultApplicationId(0, "bar")).getClass(), //LongKey.class |
| 481 | Key.of("foo", new DefaultApplicationId(0, "bar")).getClass(), //StringKey.class |
Yuta HIGUCHI | 087019b | 2014-10-28 21:07:56 -0700 | [diff] [blame] | 482 | Intent.class, |
| 483 | ConnectivityIntent.class, |
| 484 | PathIntent.class, |
| 485 | DefaultPath.class, |
| 486 | DefaultEdgeLink.class, |
| 487 | HostToHostIntent.class, |
| 488 | PointToPointIntent.class, |
Jonathan Hart | 68fef9d | 2014-10-29 17:30:03 -0700 | [diff] [blame] | 489 | MultiPointToSinglePointIntent.class, |
Michele Santuari | 4a33807 | 2014-11-05 18:38:55 +0100 | [diff] [blame] | 490 | SinglePointToMultiPointIntent.class, |
Brian O'Connor | a751537 | 2015-03-25 14:45:34 -0700 | [diff] [blame] | 491 | FlowRuleIntent.class, |
Brian O'Connor | 41718fc | 2014-10-30 16:57:21 -0700 | [diff] [blame] | 492 | LinkCollectionIntent.class, |
| 493 | OpticalConnectivityIntent.class, |
| 494 | OpticalPathIntent.class, |
Marc De Leenheer | 8c2caac | 2015-05-28 16:37:33 -0700 | [diff] [blame] | 495 | OpticalCircuitIntent.class, |
Rimon Ashkenazy | 27438ff | 2016-03-22 15:57:45 +0200 | [diff] [blame] | 496 | OpticalOduIntent.class, |
Jonathan Hart | 6552b8d | 2016-04-12 14:21:50 -0700 | [diff] [blame] | 497 | FlowObjectiveIntent.class, |
Sho SHIMIZU | f33b893 | 2016-01-25 18:43:32 -0800 | [diff] [blame] | 498 | DiscreteResource.class, |
| 499 | ContinuousResource.class, |
Sho SHIMIZU | f33b893 | 2016-01-25 18:43:32 -0800 | [diff] [blame] | 500 | DiscreteResourceId.class, |
| 501 | ContinuousResourceId.class, |
Sho SHIMIZU | 1f5e591 | 2015-08-10 17:00:00 -0700 | [diff] [blame] | 502 | ResourceAllocation.class, |
Naoki Shiota | bd1974c | 2016-04-29 18:44:17 -0700 | [diff] [blame] | 503 | ResourceConsumerId.class, |
Luca Prete | 670ac5d | 2017-02-03 15:55:43 -0800 | [diff] [blame] | 504 | ResourceGroup.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame] | 505 | // Constraints |
Thomas Vachuska | 7d0032b | 2014-11-04 17:39:57 -0800 | [diff] [blame] | 506 | BandwidthConstraint.class, |
| 507 | LinkTypeConstraint.class, |
Sho SHIMIZU | cd4bac8 | 2014-11-11 17:07:25 -0800 | [diff] [blame] | 508 | LatencyConstraint.class, |
| 509 | WaypointConstraint.class, |
| 510 | ObstacleConstraint.class, |
| 511 | AnnotationConstraint.class, |
Brian O'Connor | 72a034c | 2014-11-26 18:24:23 -0800 | [diff] [blame] | 512 | BooleanConstraint.class, |
Jonathan Hart | 96c5a4a | 2015-07-31 14:23:33 -0700 | [diff] [blame] | 513 | PartialFailureConstraint.class, |
jcc | 3d4e14a | 2015-04-21 11:32:05 +0800 | [diff] [blame] | 514 | IntentOperation.class, |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 515 | FlowRuleExtPayLoad.class, |
Thomas Vachuska | fdbc4c2 | 2015-05-29 15:53:01 -0700 | [diff] [blame] | 516 | DefaultAnnotations.class, |
| 517 | PortStatistics.class, |
Brian O'Connor | ce2d8b5 | 2015-07-29 16:24:13 -0700 | [diff] [blame] | 518 | DefaultPortStatistics.class, |
Srikanth Vavilapalli | 95810f5 | 2015-09-14 15:49:56 -0700 | [diff] [blame] | 519 | IntentDomainId.class, |
| 520 | TableStatisticsEntry.class, |
Charles Chan | c72271f | 2016-04-05 15:15:27 -0700 | [diff] [blame] | 521 | DefaultTableStatisticsEntry.class, |
Jonathan Hart | 26bd813 | 2016-04-13 10:39:55 -0700 | [diff] [blame] | 522 | EncapsulationConstraint.class, |
| 523 | EncapsulationType.class, |
jaegonkim | 7e87663 | 2017-01-25 06:01:49 +0900 | [diff] [blame] | 524 | HashedPathSelectionConstraint.class, |
Charles Chan | c72271f | 2016-04-05 15:15:27 -0700 | [diff] [blame] | 525 | // Flow Objectives |
| 526 | DefaultForwardingObjective.class, |
| 527 | ForwardingObjective.Flag.class, |
| 528 | DefaultFilteringObjective.class, |
| 529 | FilteringObjective.Type.class, |
| 530 | DefaultNextObjective.class, |
| 531 | NextObjective.Type.class, |
| 532 | Objective.Operation.class |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 533 | ) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 534 | .register(new DefaultApplicationIdSerializer(), DefaultApplicationId.class) |
Jonathan Hart | d9df7bd | 2015-11-10 17:10:25 -0800 | [diff] [blame] | 535 | .register(new UriSerializer(), URI.class) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 536 | .register(new NodeIdSerializer(), NodeId.class) |
| 537 | .register(new ProviderIdSerializer(), ProviderId.class) |
| 538 | .register(new DeviceIdSerializer(), DeviceId.class) |
| 539 | .register(new PortNumberSerializer(), PortNumber.class) |
| 540 | .register(new DefaultPortSerializer(), DefaultPort.class) |
| 541 | .register(new LinkKeySerializer(), LinkKey.class) |
| 542 | .register(new ConnectPointSerializer(), ConnectPoint.class) |
Brian O'Connor | 562d9d3 | 2016-10-07 12:16:50 -0700 | [diff] [blame] | 543 | .register(new FilteredConnectPointSerializer(), FilteredConnectPoint.class) |
Yuta HIGUCHI | 91768e3 | 2014-11-22 05:06:35 -0800 | [diff] [blame] | 544 | .register(new DefaultLinkSerializer(), DefaultLink.class) |
| 545 | .register(new MastershipTermSerializer(), MastershipTerm.class) |
| 546 | .register(new HostLocationSerializer(), HostLocation.class) |
| 547 | .register(new DefaultOutboundPacketSerializer(), DefaultOutboundPacket.class) |
Ayaka Koshibe | 08e457a | 2015-06-25 17:11:54 -0700 | [diff] [blame] | 548 | .register(new AnnotationsSerializer(), DefaultAnnotations.class) |
Jonathan Hart | 3c25916 | 2015-10-21 21:31:19 -0700 | [diff] [blame] | 549 | .register(new ExtensionInstructionSerializer(), Instructions.ExtensionInstructionWrapper.class) |
Charles Chan | 14967c2 | 2015-12-07 11:11:50 -0800 | [diff] [blame] | 550 | .register(new ExtensionCriterionSerializer(), ExtensionCriterion.class) |
Thomas Vachuska | eb851cd | 2016-07-21 15:41:05 -0700 | [diff] [blame] | 551 | .register(Region.class) |
| 552 | .register(Region.Type.class) |
| 553 | .register(RegionId.class) |
| 554 | .register(DefaultRegion.class) |
Simon Hunt | d7395c8 | 2016-10-20 17:54:01 -0700 | [diff] [blame] | 555 | .register(UiTopoLayoutId.class) |
Charles Chan | 14967c2 | 2015-12-07 11:11:50 -0800 | [diff] [blame] | 556 | .register(ExtensionSelectorType.class) |
alshabib | 880b644 | 2015-11-23 22:13:04 -0800 | [diff] [blame] | 557 | .register(ExtensionTreatmentType.class) |
Madan Jampani | cadd70b | 2016-02-08 13:45:43 -0800 | [diff] [blame] | 558 | .register(TransactionId.class) |
Jordan Halterman | 948d659 | 2017-04-20 17:18:24 -0700 | [diff] [blame] | 559 | .register(TransactionLog.class) |
Madan Jampani | 39fff10 | 2016-02-14 13:17:28 -0800 | [diff] [blame] | 560 | .register(MapUpdate.class) |
| 561 | .register(MapUpdate.Type.class) |
Madan Jampani | e97fec4 | 2015-02-17 10:53:42 -0800 | [diff] [blame] | 562 | .register(Versioned.class) |
Madan Jampani | 50589ac | 2015-06-08 11:38:46 -0700 | [diff] [blame] | 563 | .register(MapEvent.class) |
| 564 | .register(MapEvent.Type.class) |
Jonathan Hart | 46bf89b | 2017-02-27 15:56:42 -0800 | [diff] [blame] | 565 | .register(MultimapEvent.class) |
| 566 | .register(MultimapEvent.Type.class) |
Madan Jampani | 50589ac | 2015-06-08 11:38:46 -0700 | [diff] [blame] | 567 | .register(SetEvent.class) |
| 568 | .register(SetEvent.Type.class) |
Yi Tseng | fa394de | 2017-02-01 11:26:40 -0800 | [diff] [blame] | 569 | .register(GroupId.class) |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 570 | .register(Annotations.class) |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 571 | .register(OduSignalType.class) |
Ayaka Koshibe | bcb0237 | 2015-06-01 10:56:42 -0700 | [diff] [blame] | 572 | .register(OchSignalType.class) |
Sho SHIMIZU | 014c33a | 2015-04-30 11:40:37 -0700 | [diff] [blame] | 573 | .register(GridType.class) |
| 574 | .register(ChannelSpacing.class) |
Toru Furusawa | 72ee30c | 2016-01-08 13:29:04 -0800 | [diff] [blame] | 575 | .register(CltSignalType.class) |
Sho SHIMIZU | 91210a7 | 2015-04-29 12:54:28 -0700 | [diff] [blame] | 576 | .register(OchSignal.class) |
Yafit Hadar | 5796d97 | 2015-10-15 13:16:11 +0300 | [diff] [blame] | 577 | .register(OduSignalId.class) |
Rimon Ashkenazy | e2410ff | 2015-11-10 14:11:08 +0200 | [diff] [blame] | 578 | .register(TributarySlot.class) |
Rimon Ashkenazy | 8ebfff0 | 2016-02-01 11:56:36 +0200 | [diff] [blame] | 579 | .register(OtuSignalType.class) |
Michele Santuari | 4b6019e | 2014-12-19 11:31:45 +0100 | [diff] [blame] | 580 | .register( |
sangho | b35a619 | 2015-04-01 13:05:26 -0700 | [diff] [blame] | 581 | org.onlab.packet.MplsLabel.class, |
| 582 | org.onlab.packet.MPLS.class |
Marc De Leenheer | bb38235 | 2015-04-23 18:20:34 -0700 | [diff] [blame] | 583 | ) |
Sho SHIMIZU | c0e010dd | 2016-05-02 14:46:22 -0700 | [diff] [blame] | 584 | .register(ClosedOpenRange.class) |
Sho SHIMIZU | c0e010dd | 2016-05-02 14:46:22 -0700 | [diff] [blame] | 585 | .register(DiscreteResourceCodec.class) |
Carmelo Cascone | 804c001 | 2016-06-23 13:05:40 -0700 | [diff] [blame] | 586 | .register(new ImmutableByteSequenceSerializer(), ImmutableByteSequence.class) |
Yuta HIGUCHI | 4859b3a | 2016-08-16 12:58:23 -0700 | [diff] [blame] | 587 | .register(PathIntent.ProtectionType.class) |
Yuta HIGUCHI | 625fb64 | 2016-09-01 16:10:24 -0700 | [diff] [blame] | 588 | .register(ProtectionConstraint.class) |
Andreas Papazois | 0554896 | 2016-11-23 11:36:55 +0200 | [diff] [blame] | 589 | .register(ProtectedTransportEndpointDescription.class) |
| 590 | .register(ProtectionEndpointIntent.class) |
Yuta HIGUCHI | b360bb0 | 2016-12-08 16:40:48 -0800 | [diff] [blame] | 591 | .register(ProtectedTransportIntent.class) |
Yuta HIGUCHI | eb28a7c | 2017-01-13 18:59:27 -0800 | [diff] [blame] | 592 | .register(MarkerResource.class) |
Jordi Ortiz | 1b1a3b4 | 2017-03-03 12:36:54 +0100 | [diff] [blame] | 593 | .register(new BitSetSerializer(), BitSet.class) |
Michele Santuari | 38dd82e | 2017-01-04 09:23:49 +0100 | [diff] [blame] | 594 | .register(DomainIntent.class) |
Pier Luigi | 02778b1 | 2017-09-11 17:51:13 +0200 | [diff] [blame] | 595 | .register(DomainConstraint.class) |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 596 | .register( |
| 597 | // PI model |
| 598 | PiMatchType.class, |
| 599 | PiPipeconfId.class, |
| 600 | // PI Runtime |
| 601 | PiAction.class, |
| 602 | PiActionGroup.class, |
| 603 | PiActionGroupId.class, |
| 604 | PiActionGroupMember.class, |
| 605 | PiActionGroupMemberId.class, |
| 606 | PiActionId.class, |
| 607 | PiActionParam.class, |
| 608 | PiActionParamId.class, |
| 609 | PiExactFieldMatch.class, |
| 610 | PiFieldMatch.class, |
Carmelo Cascone | 87b9b39 | 2017-10-02 18:33:20 +0200 | [diff] [blame^] | 611 | PiGroupKey.class, |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 612 | PiHeaderFieldId.class, |
| 613 | PiLpmFieldMatch.class, |
| 614 | PiMatchKey.class, |
| 615 | PiPacketMetadata.class, |
| 616 | PiPacketMetadataId.class, |
| 617 | PiPacketOperation.class, |
| 618 | PiPipeconfConfig.class, |
| 619 | PiRangeFieldMatch.class, |
| 620 | PiTableAction.class, |
| 621 | PiTableEntry.class, |
| 622 | PiTableId.class, |
| 623 | PiTernaryFieldMatch.class, |
| 624 | PiValidFieldMatch.class, |
Yi Tseng | 82512da | 2017-08-16 19:46:36 -0700 | [diff] [blame] | 625 | PiActionProfileId.class, |
Carmelo Cascone | 72343c5 | 2017-09-05 17:37:10 +0200 | [diff] [blame] | 626 | // Other |
| 627 | PiCriterion.class, |
| 628 | PiInstruction.class |
| 629 | ) |
HIGUCHI Yuta | b2d0fd8 | 2016-05-17 20:34:58 -0700 | [diff] [blame] | 630 | .build("API"); |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 631 | |
Jonathan Hart | 679d24d | 2016-05-13 13:29:53 -0700 | [diff] [blame] | 632 | /** |
| 633 | * Kryo registration Id for user custom registration. |
| 634 | */ |
| 635 | public static final int BEGIN_USER_CUSTOM_ID = API_MAX_SIZE + 1; |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 636 | |
| 637 | // not to be instantiated |
alshabib | 1aa5814 | 2016-02-17 15:37:56 -0800 | [diff] [blame] | 638 | private KryoNamespaces() { |
| 639 | } |
Yuta HIGUCHI | 03fec1f | 2014-10-03 09:13:50 -0700 | [diff] [blame] | 640 | } |