Jonathan Hart

Register UpdateRequest in Kryo

Change-Id: I4f51e8f9e9cce55a912bc464d1593f9ad233ead9
...@@ -15,33 +15,12 @@ ...@@ -15,33 +15,12 @@
15 */ 15 */
16 package org.onosproject.store.primitives.impl; 16 package org.onosproject.store.primitives.impl;
17 17
18 -import static com.google.common.base.Preconditions.checkNotNull; 18 +import com.google.common.collect.Collections2;
19 -import static com.google.common.base.Preconditions.checkState; 19 +import com.google.common.collect.ImmutableList;
20 -import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor; 20 +import com.google.common.collect.ImmutableMap;
21 -import static org.onlab.util.BoundedThreadPool.newFixedThreadPool; 21 +import com.google.common.collect.Lists;
22 -import static org.onlab.util.Tools.groupedThreads; 22 +import com.google.common.collect.Maps;
23 -import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT; 23 +import com.google.common.collect.Sets;
24 -import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE;
25 -
26 -import java.util.Collection;
27 -import java.util.Collections;
28 -import java.util.HashSet;
29 -import java.util.List;
30 -import java.util.Map;
31 -import java.util.Objects;
32 -import java.util.Optional;
33 -import java.util.Set;
34 -import java.util.Timer;
35 -import java.util.concurrent.CompletableFuture;
36 -import java.util.concurrent.ExecutorService;
37 -import java.util.concurrent.Executors;
38 -import java.util.concurrent.ScheduledExecutorService;
39 -import java.util.concurrent.TimeUnit;
40 -import java.util.concurrent.atomic.AtomicBoolean;
41 -import java.util.concurrent.atomic.AtomicReference;
42 -import java.util.function.BiFunction;
43 -import java.util.stream.Collectors;
44 -
45 import org.apache.commons.lang3.tuple.Pair; 24 import org.apache.commons.lang3.tuple.Pair;
46 import org.onlab.util.AbstractAccumulator; 25 import org.onlab.util.AbstractAccumulator;
47 import org.onlab.util.KryoNamespace; 26 import org.onlab.util.KryoNamespace;
...@@ -63,12 +42,32 @@ import org.onosproject.store.service.WallClockTimestamp; ...@@ -63,12 +42,32 @@ import org.onosproject.store.service.WallClockTimestamp;
63 import org.slf4j.Logger; 42 import org.slf4j.Logger;
64 import org.slf4j.LoggerFactory; 43 import org.slf4j.LoggerFactory;
65 44
66 -import com.google.common.collect.Collections2; 45 +import java.util.Collection;
67 -import com.google.common.collect.ImmutableList; 46 +import java.util.Collections;
68 -import com.google.common.collect.ImmutableMap; 47 +import java.util.HashSet;
69 -import com.google.common.collect.Lists; 48 +import java.util.List;
70 -import com.google.common.collect.Maps; 49 +import java.util.Map;
71 -import com.google.common.collect.Sets; 50 +import java.util.Objects;
51 +import java.util.Optional;
52 +import java.util.Set;
53 +import java.util.Timer;
54 +import java.util.concurrent.CompletableFuture;
55 +import java.util.concurrent.ExecutorService;
56 +import java.util.concurrent.Executors;
57 +import java.util.concurrent.ScheduledExecutorService;
58 +import java.util.concurrent.TimeUnit;
59 +import java.util.concurrent.atomic.AtomicBoolean;
60 +import java.util.concurrent.atomic.AtomicReference;
61 +import java.util.function.BiFunction;
62 +import java.util.stream.Collectors;
63 +
64 +import static com.google.common.base.Preconditions.checkNotNull;
65 +import static com.google.common.base.Preconditions.checkState;
66 +import static java.util.concurrent.Executors.newSingleThreadScheduledExecutor;
67 +import static org.onlab.util.BoundedThreadPool.newFixedThreadPool;
68 +import static org.onlab.util.Tools.groupedThreads;
69 +import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.PUT;
70 +import static org.onosproject.store.service.EventuallyConsistentMapEvent.Type.REMOVE;
72 71
73 /** 72 /**
74 * Distributed Map implementation which uses optimistic replication and gossip 73 * Distributed Map implementation which uses optimistic replication and gossip
...@@ -281,6 +280,7 @@ public class EventuallyConsistentMapImpl<K, V> ...@@ -281,6 +280,7 @@ public class EventuallyConsistentMapImpl<K, V>
281 .register(UpdateEntry.class) 280 .register(UpdateEntry.class)
282 .register(MapValue.class) 281 .register(MapValue.class)
283 .register(MapValue.Digest.class) 282 .register(MapValue.Digest.class)
283 + .register(UpdateRequest.class)
284 .build(name() + "-ecmap")); 284 .build(name() + "-ecmap"));
285 } 285 }
286 286
......