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