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