Committed by
Gerrit Code Review
Moved EventuallyConsistentMap classes into their own package.
Change-Id: I930a988a8cd8d47826a6f7d0f4ce23c56446df20
Showing
12 changed files
with
32 additions
and
26 deletions
... | @@ -18,7 +18,6 @@ package org.onosproject.store.app; | ... | @@ -18,7 +18,6 @@ package org.onosproject.store.app; |
18 | import com.google.common.base.Charsets; | 18 | import com.google.common.base.Charsets; |
19 | import com.google.common.collect.ImmutableSet; | 19 | import com.google.common.collect.ImmutableSet; |
20 | import com.google.common.util.concurrent.ListenableFuture; | 20 | import com.google.common.util.concurrent.ListenableFuture; |
21 | - | ||
22 | import org.apache.felix.scr.annotations.Activate; | 21 | import org.apache.felix.scr.annotations.Activate; |
23 | import org.apache.felix.scr.annotations.Component; | 22 | import org.apache.felix.scr.annotations.Component; |
24 | import org.apache.felix.scr.annotations.Deactivate; | 23 | import org.apache.felix.scr.annotations.Deactivate; |
... | @@ -43,10 +42,10 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | ... | @@ -43,10 +42,10 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
43 | import org.onosproject.store.cluster.messaging.ClusterMessage; | 42 | import org.onosproject.store.cluster.messaging.ClusterMessage; |
44 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; | 43 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; |
45 | import org.onosproject.store.cluster.messaging.MessageSubject; | 44 | import org.onosproject.store.cluster.messaging.MessageSubject; |
46 | -import org.onosproject.store.impl.EventuallyConsistentMap; | 45 | +import org.onosproject.store.ecmap.EventuallyConsistentMap; |
47 | -import org.onosproject.store.impl.EventuallyConsistentMapEvent; | 46 | +import org.onosproject.store.ecmap.EventuallyConsistentMapEvent; |
48 | -import org.onosproject.store.impl.EventuallyConsistentMapImpl; | 47 | +import org.onosproject.store.ecmap.EventuallyConsistentMapImpl; |
49 | -import org.onosproject.store.impl.EventuallyConsistentMapListener; | 48 | +import org.onosproject.store.ecmap.EventuallyConsistentMapListener; |
50 | import org.onosproject.store.impl.WallclockClockManager; | 49 | import org.onosproject.store.impl.WallclockClockManager; |
51 | import org.onosproject.store.serializers.KryoNamespaces; | 50 | import org.onosproject.store.serializers.KryoNamespaces; |
52 | import org.slf4j.Logger; | 51 | import org.slf4j.Logger; |
... | @@ -63,9 +62,11 @@ import static com.google.common.io.ByteStreams.toByteArray; | ... | @@ -63,9 +62,11 @@ import static com.google.common.io.ByteStreams.toByteArray; |
63 | import static java.util.concurrent.TimeUnit.MILLISECONDS; | 62 | import static java.util.concurrent.TimeUnit.MILLISECONDS; |
64 | import static org.onlab.util.Tools.namedThreads; | 63 | import static org.onlab.util.Tools.namedThreads; |
65 | import static org.onosproject.app.ApplicationEvent.Type.*; | 64 | import static org.onosproject.app.ApplicationEvent.Type.*; |
66 | -import static org.onosproject.store.app.GossipApplicationStore.InternalState.*; | 65 | +import static org.onosproject.store.app.GossipApplicationStore.InternalState.ACTIVATED; |
67 | -import static org.onosproject.store.impl.EventuallyConsistentMapEvent.Type.PUT; | 66 | +import static org.onosproject.store.app.GossipApplicationStore.InternalState.DEACTIVATED; |
68 | -import static org.onosproject.store.impl.EventuallyConsistentMapEvent.Type.REMOVE; | 67 | +import static org.onosproject.store.app.GossipApplicationStore.InternalState.INSTALLED; |
68 | +import static org.onosproject.store.ecmap.EventuallyConsistentMapEvent.Type.PUT; | ||
69 | +import static org.onosproject.store.ecmap.EventuallyConsistentMapEvent.Type.REMOVE; | ||
69 | import static org.slf4j.LoggerFactory.getLogger; | 70 | import static org.slf4j.LoggerFactory.getLogger; |
70 | 71 | ||
71 | /** | 72 | /** | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import org.onosproject.cluster.NodeId; | 18 | import org.onosproject.cluster.NodeId; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import java.util.Collection; | 18 | import java.util.Collection; |
19 | import java.util.Map; | 19 | import java.util.Map; |
... | @@ -32,7 +32,7 @@ import java.util.Set; | ... | @@ -32,7 +32,7 @@ import java.util.Set; |
32 | * API). | 32 | * API). |
33 | * </p><p> | 33 | * </p><p> |
34 | * Clients are expected to register an | 34 | * Clients are expected to register an |
35 | - * {@link org.onosproject.store.impl.EventuallyConsistentMapListener} if they | 35 | + * {@link EventuallyConsistentMapListener} if they |
36 | * are interested in receiving notifications of update to the map. | 36 | * are interested in receiving notifications of update to the map. |
37 | * </p><p> | 37 | * </p><p> |
38 | * Null values are not allowed in this map. | 38 | * Null values are not allowed in this map. |
... | @@ -85,7 +85,7 @@ public interface EventuallyConsistentMap<K, V> { | ... | @@ -85,7 +85,7 @@ public interface EventuallyConsistentMap<K, V> { |
85 | * Note: this differs from the specification of {@link java.util.Map} | 85 | * Note: this differs from the specification of {@link java.util.Map} |
86 | * because it does not return the previous value associated with the key. | 86 | * because it does not return the previous value associated with the key. |
87 | * Clients are expected to register an | 87 | * Clients are expected to register an |
88 | - * {@link org.onosproject.store.impl.EventuallyConsistentMapListener} if | 88 | + * {@link EventuallyConsistentMapListener} if |
89 | * they are interested in receiving notification of updates to the map. | 89 | * they are interested in receiving notification of updates to the map. |
90 | * </p><p> | 90 | * </p><p> |
91 | * Null values are not allowed in the map. | 91 | * Null values are not allowed in the map. |
... | @@ -102,7 +102,7 @@ public interface EventuallyConsistentMap<K, V> { | ... | @@ -102,7 +102,7 @@ public interface EventuallyConsistentMap<K, V> { |
102 | * Note: this differs from the specification of {@link java.util.Map} | 102 | * Note: this differs from the specification of {@link java.util.Map} |
103 | * because it does not return the previous value associated with the key. | 103 | * because it does not return the previous value associated with the key. |
104 | * Clients are expected to register an | 104 | * Clients are expected to register an |
105 | - * {@link org.onosproject.store.impl.EventuallyConsistentMapListener} if | 105 | + * {@link EventuallyConsistentMapListener} if |
106 | * they are interested in receiving notification of updates to the map. | 106 | * they are interested in receiving notification of updates to the map. |
107 | * </p> | 107 | * </p> |
108 | * | 108 | * |
... | @@ -122,7 +122,7 @@ public interface EventuallyConsistentMap<K, V> { | ... | @@ -122,7 +122,7 @@ public interface EventuallyConsistentMap<K, V> { |
122 | * Note: this differs from the specification of {@link java.util.Map} | 122 | * Note: this differs from the specification of {@link java.util.Map} |
123 | * because it does not return a boolean indication whether a value was removed. | 123 | * because it does not return a boolean indication whether a value was removed. |
124 | * Clients are expected to register an | 124 | * Clients are expected to register an |
125 | - * {@link org.onosproject.store.impl.EventuallyConsistentMapListener} if | 125 | + * {@link EventuallyConsistentMapListener} if |
126 | * they are interested in receiving notification of updates to the map. | 126 | * they are interested in receiving notification of updates to the map. |
127 | * </p> | 127 | * </p> |
128 | * | 128 | * | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | 19 | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import org.apache.commons.lang3.RandomUtils; | 18 | import org.apache.commons.lang3.RandomUtils; |
19 | import org.apache.commons.lang3.tuple.Pair; | 19 | import org.apache.commons.lang3.tuple.Pair; |
... | @@ -26,6 +26,9 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | ... | @@ -26,6 +26,9 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
26 | import org.onosproject.store.cluster.messaging.ClusterMessage; | 26 | import org.onosproject.store.cluster.messaging.ClusterMessage; |
27 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; | 27 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; |
28 | import org.onosproject.store.cluster.messaging.MessageSubject; | 28 | import org.onosproject.store.cluster.messaging.MessageSubject; |
29 | +import org.onosproject.store.impl.ClockService; | ||
30 | +import org.onosproject.store.impl.Timestamped; | ||
31 | +import org.onosproject.store.impl.WallClockTimestamp; | ||
29 | import org.onosproject.store.serializers.KryoSerializer; | 32 | import org.onosproject.store.serializers.KryoSerializer; |
30 | import org.slf4j.Logger; | 33 | import org.slf4j.Logger; |
31 | import org.slf4j.LoggerFactory; | 34 | import org.slf4j.LoggerFactory; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | /** | 18 | /** |
19 | * Listener interested in receiving modification events for an | 19 | * Listener interested in receiving modification events for an | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.collect.ImmutableList; | 18 | import com.google.common.collect.ImmutableList; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.collect.ImmutableList; | 18 | import com.google.common.collect.ImmutableList; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.base.MoreObjects; | 18 | import com.google.common.base.MoreObjects; |
19 | import org.onosproject.store.Timestamp; | 19 | import org.onosproject.store.Timestamp; | ... | ... |
... | @@ -32,12 +32,12 @@ import org.onosproject.net.intent.IntentStoreDelegate; | ... | @@ -32,12 +32,12 @@ import org.onosproject.net.intent.IntentStoreDelegate; |
32 | import org.onosproject.net.intent.Key; | 32 | import org.onosproject.net.intent.Key; |
33 | import org.onosproject.store.AbstractStore; | 33 | import org.onosproject.store.AbstractStore; |
34 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | 34 | import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
35 | -import org.onosproject.store.impl.EventuallyConsistentMap; | ||
36 | -import org.onosproject.store.impl.EventuallyConsistentMapEvent; | ||
37 | -import org.onosproject.store.impl.EventuallyConsistentMapImpl; | ||
38 | -import org.onosproject.store.impl.EventuallyConsistentMapListener; | ||
39 | import org.onosproject.store.impl.MultiValuedTimestamp; | 35 | import org.onosproject.store.impl.MultiValuedTimestamp; |
40 | import org.onosproject.store.impl.SystemClockTimestamp; | 36 | import org.onosproject.store.impl.SystemClockTimestamp; |
37 | +import org.onosproject.store.ecmap.EventuallyConsistentMap; | ||
38 | +import org.onosproject.store.ecmap.EventuallyConsistentMapEvent; | ||
39 | +import org.onosproject.store.ecmap.EventuallyConsistentMapImpl; | ||
40 | +import org.onosproject.store.ecmap.EventuallyConsistentMapListener; | ||
41 | import org.onosproject.store.serializers.KryoNamespaces; | 41 | import org.onosproject.store.serializers.KryoNamespaces; |
42 | import org.slf4j.Logger; | 42 | import org.slf4j.Logger; |
43 | 43 | ... | ... |
... | @@ -13,7 +13,7 @@ | ... | @@ -13,7 +13,7 @@ |
13 | * See the License for the specific language governing permissions and | 13 | * See the License for the specific language governing permissions and |
14 | * limitations under the License. | 14 | * limitations under the License. |
15 | */ | 15 | */ |
16 | -package org.onosproject.store.impl; | 16 | +package org.onosproject.store.ecmap; |
17 | 17 | ||
18 | import com.google.common.collect.ComparisonChain; | 18 | import com.google.common.collect.ComparisonChain; |
19 | import com.google.common.util.concurrent.ListenableFuture; | 19 | import com.google.common.util.concurrent.ListenableFuture; |
... | @@ -31,6 +31,8 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; | ... | @@ -31,6 +31,8 @@ import org.onosproject.store.cluster.messaging.ClusterCommunicationService; |
31 | import org.onosproject.store.cluster.messaging.ClusterMessage; | 31 | import org.onosproject.store.cluster.messaging.ClusterMessage; |
32 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; | 32 | import org.onosproject.store.cluster.messaging.ClusterMessageHandler; |
33 | import org.onosproject.store.cluster.messaging.MessageSubject; | 33 | import org.onosproject.store.cluster.messaging.MessageSubject; |
34 | +import org.onosproject.store.impl.ClockService; | ||
35 | +import org.onosproject.store.impl.WallClockTimestamp; | ||
34 | import org.onosproject.store.serializers.KryoNamespaces; | 36 | import org.onosproject.store.serializers.KryoNamespaces; |
35 | import org.onosproject.store.serializers.KryoSerializer; | 37 | import org.onosproject.store.serializers.KryoSerializer; |
36 | 38 | ... | ... |
-
Please register or login to post a comment