Register FlowRuleEvent.Type with Kryo.
Fixes ONOS-504. Change-Id: Ia8a9b229c9eb212cf97ce3ed81c31febe84e3184
Showing
1 changed file
with
9 additions
and
5 deletions
| ... | @@ -16,10 +16,13 @@ | ... | @@ -16,10 +16,13 @@ |
| 16 | package org.onosproject.store.flow.impl; | 16 | package org.onosproject.store.flow.impl; |
| 17 | 17 | ||
| 18 | import static com.google.common.base.Preconditions.checkNotNull; | 18 | import static com.google.common.base.Preconditions.checkNotNull; |
| 19 | +import static org.onlab.util.Tools.namedThreads; | ||
| 19 | import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_REMOVED; | 20 | import static org.onosproject.net.flow.FlowRuleEvent.Type.RULE_REMOVED; |
| 21 | +import static org.onosproject.store.flow.impl.FlowStoreMessageSubjects.APPLY_BATCH_FLOWS; | ||
| 22 | +import static org.onosproject.store.flow.impl.FlowStoreMessageSubjects.GET_DEVICE_FLOW_ENTRIES; | ||
| 23 | +import static org.onosproject.store.flow.impl.FlowStoreMessageSubjects.GET_FLOW_ENTRY; | ||
| 24 | +import static org.onosproject.store.flow.impl.FlowStoreMessageSubjects.REMOVE_FLOW_ENTRY; | ||
| 20 | import static org.slf4j.LoggerFactory.getLogger; | 25 | import static org.slf4j.LoggerFactory.getLogger; |
| 21 | -import static org.onosproject.store.flow.impl.FlowStoreMessageSubjects.*; | ||
| 22 | -import static org.onlab.util.Tools.namedThreads; | ||
| 23 | 26 | ||
| 24 | import java.io.IOException; | 27 | import java.io.IOException; |
| 25 | import java.util.ArrayList; | 28 | import java.util.ArrayList; |
| ... | @@ -27,6 +30,7 @@ import java.util.Arrays; | ... | @@ -27,6 +30,7 @@ import java.util.Arrays; |
| 27 | import java.util.Collection; | 30 | import java.util.Collection; |
| 28 | import java.util.Collections; | 31 | import java.util.Collections; |
| 29 | import java.util.HashSet; | 32 | import java.util.HashSet; |
| 33 | +import java.util.List; | ||
| 30 | import java.util.Map.Entry; | 34 | import java.util.Map.Entry; |
| 31 | import java.util.Set; | 35 | import java.util.Set; |
| 32 | import java.util.concurrent.ExecutionException; | 36 | import java.util.concurrent.ExecutionException; |
| ... | @@ -37,7 +41,6 @@ import java.util.concurrent.TimeUnit; | ... | @@ -37,7 +41,6 @@ import java.util.concurrent.TimeUnit; |
| 37 | import java.util.concurrent.TimeoutException; | 41 | import java.util.concurrent.TimeoutException; |
| 38 | import java.util.concurrent.atomic.AtomicInteger; | 42 | import java.util.concurrent.atomic.AtomicInteger; |
| 39 | import java.util.concurrent.locks.ReentrantReadWriteLock; | 43 | import java.util.concurrent.locks.ReentrantReadWriteLock; |
| 40 | -import java.util.List; | ||
| 41 | 44 | ||
| 42 | import org.apache.felix.scr.annotations.Activate; | 45 | import org.apache.felix.scr.annotations.Activate; |
| 43 | import org.apache.felix.scr.annotations.Component; | 46 | import org.apache.felix.scr.annotations.Component; |
| ... | @@ -45,6 +48,7 @@ import org.apache.felix.scr.annotations.Deactivate; | ... | @@ -45,6 +48,7 @@ import org.apache.felix.scr.annotations.Deactivate; |
| 45 | import org.apache.felix.scr.annotations.Reference; | 48 | import org.apache.felix.scr.annotations.Reference; |
| 46 | import org.apache.felix.scr.annotations.ReferenceCardinality; | 49 | import org.apache.felix.scr.annotations.ReferenceCardinality; |
| 47 | import org.apache.felix.scr.annotations.Service; | 50 | import org.apache.felix.scr.annotations.Service; |
| 51 | +import org.onlab.util.KryoNamespace; | ||
| 48 | import org.onosproject.cluster.ClusterService; | 52 | import org.onosproject.cluster.ClusterService; |
| 49 | import org.onosproject.cluster.NodeId; | 53 | import org.onosproject.cluster.NodeId; |
| 50 | import org.onosproject.net.Device; | 54 | import org.onosproject.net.Device; |
| ... | @@ -57,11 +61,11 @@ import org.onosproject.net.flow.FlowEntry.FlowEntryState; | ... | @@ -57,11 +61,11 @@ import org.onosproject.net.flow.FlowEntry.FlowEntryState; |
| 57 | import org.onosproject.net.flow.FlowId; | 61 | import org.onosproject.net.flow.FlowId; |
| 58 | import org.onosproject.net.flow.FlowRule; | 62 | import org.onosproject.net.flow.FlowRule; |
| 59 | import org.onosproject.net.flow.FlowRuleBatchEntry; | 63 | import org.onosproject.net.flow.FlowRuleBatchEntry; |
| 64 | +import org.onosproject.net.flow.FlowRuleBatchEntry.FlowRuleOperation; | ||
| 60 | import org.onosproject.net.flow.FlowRuleBatchEvent; | 65 | import org.onosproject.net.flow.FlowRuleBatchEvent; |
| 61 | import org.onosproject.net.flow.FlowRuleBatchOperation; | 66 | import org.onosproject.net.flow.FlowRuleBatchOperation; |
| 62 | import org.onosproject.net.flow.FlowRuleBatchRequest; | 67 | import org.onosproject.net.flow.FlowRuleBatchRequest; |
| 63 | import org.onosproject.net.flow.FlowRuleEvent; | 68 | import org.onosproject.net.flow.FlowRuleEvent; |
| 64 | -import org.onosproject.net.flow.FlowRuleBatchEntry.FlowRuleOperation; | ||
| 65 | import org.onosproject.net.flow.FlowRuleEvent.Type; | 69 | import org.onosproject.net.flow.FlowRuleEvent.Type; |
| 66 | import org.onosproject.net.flow.FlowRuleStore; | 70 | import org.onosproject.net.flow.FlowRuleStore; |
| 67 | import org.onosproject.net.flow.FlowRuleStoreDelegate; | 71 | import org.onosproject.net.flow.FlowRuleStoreDelegate; |
| ... | @@ -79,7 +83,6 @@ import org.onosproject.store.serializers.DecodeTo; | ... | @@ -79,7 +83,6 @@ import org.onosproject.store.serializers.DecodeTo; |
| 79 | import org.onosproject.store.serializers.KryoSerializer; | 83 | import org.onosproject.store.serializers.KryoSerializer; |
| 80 | import org.onosproject.store.serializers.StoreSerializer; | 84 | import org.onosproject.store.serializers.StoreSerializer; |
| 81 | import org.onosproject.store.serializers.impl.DistributedStoreSerializers; | 85 | import org.onosproject.store.serializers.impl.DistributedStoreSerializers; |
| 82 | -import org.onlab.util.KryoNamespace; | ||
| 83 | import org.slf4j.Logger; | 86 | import org.slf4j.Logger; |
| 84 | 87 | ||
| 85 | import com.google.common.cache.Cache; | 88 | import com.google.common.cache.Cache; |
| ... | @@ -157,6 +160,7 @@ public class DistributedFlowRuleStore | ... | @@ -157,6 +160,7 @@ public class DistributedFlowRuleStore |
| 157 | .register(DistributedStoreSerializers.STORE_COMMON) | 160 | .register(DistributedStoreSerializers.STORE_COMMON) |
| 158 | .nextId(DistributedStoreSerializers.STORE_CUSTOM_BEGIN) | 161 | .nextId(DistributedStoreSerializers.STORE_CUSTOM_BEGIN) |
| 159 | .register(FlowRuleEvent.class) | 162 | .register(FlowRuleEvent.class) |
| 163 | + .register(FlowRuleEvent.Type.class) | ||
| 160 | .build(); | 164 | .build(); |
| 161 | } | 165 | } |
| 162 | }; | 166 | }; | ... | ... |
-
Please register or login to post a comment