Fix serializer in DistributedGroupStore
Change-Id: I27f0b9e110592782bc6e886ad94c2086942aa073
Showing
1 changed file
with
2 additions
and
41 deletions
... | @@ -28,18 +28,11 @@ import org.apache.felix.scr.annotations.Service; | ... | @@ -28,18 +28,11 @@ import org.apache.felix.scr.annotations.Service; |
28 | import org.onlab.util.KryoNamespace; | 28 | import org.onlab.util.KryoNamespace; |
29 | import org.onlab.util.NewConcurrentHashMap; | 29 | import org.onlab.util.NewConcurrentHashMap; |
30 | import org.onosproject.cluster.ClusterService; | 30 | import org.onosproject.cluster.ClusterService; |
31 | -import org.onosproject.core.DefaultApplicationId; | ||
32 | import org.onosproject.core.DefaultGroupId; | 31 | import org.onosproject.core.DefaultGroupId; |
33 | import org.onosproject.core.GroupId; | 32 | import org.onosproject.core.GroupId; |
34 | import org.onosproject.mastership.MastershipService; | 33 | import org.onosproject.mastership.MastershipService; |
35 | import org.onosproject.net.DeviceId; | 34 | import org.onosproject.net.DeviceId; |
36 | import org.onosproject.net.MastershipRole; | 35 | import org.onosproject.net.MastershipRole; |
37 | -import org.onosproject.net.PortNumber; | ||
38 | -import org.onosproject.net.flow.DefaultTrafficTreatment; | ||
39 | -import org.onosproject.net.flow.instructions.Instructions; | ||
40 | -import org.onosproject.net.flow.instructions.L0ModificationInstruction; | ||
41 | -import org.onosproject.net.flow.instructions.L2ModificationInstruction; | ||
42 | -import org.onosproject.net.flow.instructions.L3ModificationInstruction; | ||
43 | import org.onosproject.net.group.DefaultGroup; | 36 | import org.onosproject.net.group.DefaultGroup; |
44 | import org.onosproject.net.group.DefaultGroupBucket; | 37 | import org.onosproject.net.group.DefaultGroupBucket; |
45 | import org.onosproject.net.group.DefaultGroupDescription; | 38 | import org.onosproject.net.group.DefaultGroupDescription; |
... | @@ -60,9 +53,7 @@ import org.onosproject.net.group.StoredGroupEntry; | ... | @@ -60,9 +53,7 @@ import org.onosproject.net.group.StoredGroupEntry; |
60 | import org.onosproject.store.AbstractStore; | 53 | import org.onosproject.store.AbstractStore; |
61 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | 54 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
62 | import org.onosproject.store.service.MultiValuedTimestamp; | 55 | import org.onosproject.store.service.MultiValuedTimestamp; |
63 | -import org.onosproject.store.serializers.DeviceIdSerializer; | ||
64 | import org.onosproject.store.serializers.KryoNamespaces; | 56 | import org.onosproject.store.serializers.KryoNamespaces; |
65 | -import org.onosproject.store.serializers.URISerializer; | ||
66 | import org.onosproject.store.service.EventuallyConsistentMap; | 57 | import org.onosproject.store.service.EventuallyConsistentMap; |
67 | import org.onosproject.store.service.EventuallyConsistentMapBuilder; | 58 | import org.onosproject.store.service.EventuallyConsistentMapBuilder; |
68 | import org.onosproject.store.service.EventuallyConsistentMapEvent; | 59 | import org.onosproject.store.service.EventuallyConsistentMapEvent; |
... | @@ -70,7 +61,6 @@ import org.onosproject.store.service.EventuallyConsistentMapListener; | ... | @@ -70,7 +61,6 @@ import org.onosproject.store.service.EventuallyConsistentMapListener; |
70 | import org.onosproject.store.service.StorageService; | 61 | import org.onosproject.store.service.StorageService; |
71 | import org.slf4j.Logger; | 62 | import org.slf4j.Logger; |
72 | 63 | ||
73 | -import java.net.URI; | ||
74 | import java.util.ArrayList; | 64 | import java.util.ArrayList; |
75 | import java.util.Collection; | 65 | import java.util.Collection; |
76 | import java.util.HashMap; | 66 | import java.util.HashMap; |
... | @@ -141,6 +131,7 @@ public class DistributedGroupStore | ... | @@ -141,6 +131,7 @@ public class DistributedGroupStore |
141 | @Activate | 131 | @Activate |
142 | public void activate() { | 132 | public void activate() { |
143 | kryoBuilder = new KryoNamespace.Builder() | 133 | kryoBuilder = new KryoNamespace.Builder() |
134 | + .register(KryoNamespaces.API) | ||
144 | .register(DefaultGroup.class, | 135 | .register(DefaultGroup.class, |
145 | DefaultGroupBucket.class, | 136 | DefaultGroupBucket.class, |
146 | DefaultGroupDescription.class, | 137 | DefaultGroupDescription.class, |
... | @@ -157,37 +148,7 @@ public class DistributedGroupStore | ... | @@ -157,37 +148,7 @@ public class DistributedGroupStore |
157 | GroupStoreKeyMapKey.class, | 148 | GroupStoreKeyMapKey.class, |
158 | GroupStoreIdMapKey.class, | 149 | GroupStoreIdMapKey.class, |
159 | GroupStoreMapKey.class | 150 | GroupStoreMapKey.class |
160 | - ) | 151 | + ); |
161 | - .register(new URISerializer(), URI.class) | ||
162 | - .register(new DeviceIdSerializer(), DeviceId.class) | ||
163 | - .register(PortNumber.class) | ||
164 | - .register(DefaultApplicationId.class) | ||
165 | - .register(DefaultTrafficTreatment.class, | ||
166 | - Instructions.DropInstruction.class, | ||
167 | - Instructions.OutputInstruction.class, | ||
168 | - Instructions.GroupInstruction.class, | ||
169 | - Instructions.TableTypeTransition.class, | ||
170 | - L0ModificationInstruction.class, | ||
171 | - L0ModificationInstruction.L0SubType.class, | ||
172 | - L0ModificationInstruction.ModLambdaInstruction.class, | ||
173 | - L2ModificationInstruction.class, | ||
174 | - L2ModificationInstruction.L2SubType.class, | ||
175 | - L2ModificationInstruction.ModEtherInstruction.class, | ||
176 | - L2ModificationInstruction.PushHeaderInstructions.class, | ||
177 | - L2ModificationInstruction.ModVlanIdInstruction.class, | ||
178 | - L2ModificationInstruction.ModVlanPcpInstruction.class, | ||
179 | - L2ModificationInstruction.ModMplsLabelInstruction.class, | ||
180 | - L2ModificationInstruction.ModMplsTtlInstruction.class, | ||
181 | - L3ModificationInstruction.class, | ||
182 | - L3ModificationInstruction.L3SubType.class, | ||
183 | - L3ModificationInstruction.ModIPInstruction.class, | ||
184 | - L3ModificationInstruction.ModIPv6FlowLabelInstruction.class, | ||
185 | - L3ModificationInstruction.ModTtlInstruction.class, | ||
186 | - org.onlab.packet.MplsLabel.class | ||
187 | - ) | ||
188 | - .register(org.onosproject.cluster.NodeId.class) | ||
189 | - .register(KryoNamespaces.BASIC) | ||
190 | - .register(KryoNamespaces.MISC); | ||
191 | 152 | ||
192 | messageHandlingExecutor = Executors. | 153 | messageHandlingExecutor = Executors. |
193 | newFixedThreadPool(MESSAGE_HANDLER_THREAD_POOL_SIZE, | 154 | newFixedThreadPool(MESSAGE_HANDLER_THREAD_POOL_SIZE, | ... | ... |
-
Please register or login to post a comment