Bump versions to 4.0.0-SNAPSHOT
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / PrefixedShardConfigUpdateHandler.java
index 7dbdd290e69d9e6fa7be758c0d76b09387d78de2..44b68a98052daeb5d7992833520c9a3d9ba1b95b 100644 (file)
@@ -5,22 +5,21 @@
  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
-
 package org.opendaylight.controller.cluster.sharding;
 
 import static akka.actor.ActorRef.noSender;
+import static java.util.Objects.requireNonNull;
 import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_PREFIX_QNAME;
 import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_REPLICAS_QNAME;
 import static org.opendaylight.controller.cluster.datastore.utils.ClusterUtils.SHARD_REPLICA_QNAME;
 
 import akka.actor.ActorRef;
-import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.EnumMap;
 import java.util.List;
 import java.util.stream.Collectors;
 import org.opendaylight.controller.cluster.access.concepts.MemberName;
-import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
+import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface;
 import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration;
 import org.opendaylight.controller.cluster.datastore.shardstrategy.PrefixShardStrategy;
 import org.opendaylight.controller.cluster.datastore.utils.ClusterUtils;
@@ -47,6 +46,7 @@ import org.slf4j.LoggerFactory;
  * notifies handling actor with {@link PrefixShardCreated} and
  * {@link PrefixShardRemoved} messages.
  */
+@Deprecated(forRemoval = true)
 public class PrefixedShardConfigUpdateHandler {
 
     private static final Logger LOG = LoggerFactory.getLogger(PrefixedShardConfigUpdateHandler.class);
@@ -57,11 +57,11 @@ public class PrefixedShardConfigUpdateHandler {
             new EnumMap<>(LogicalDatastoreType.class);
 
     public PrefixedShardConfigUpdateHandler(final ActorRef handlingActor, final MemberName memberName) {
-        this.handlingActor = Preconditions.checkNotNull(handlingActor);
-        this.memberName = Preconditions.checkNotNull(memberName);
+        this.handlingActor = requireNonNull(handlingActor);
+        this.memberName = requireNonNull(memberName);
     }
 
-    public void initListener(final AbstractDataStore dataStore, final LogicalDatastoreType type) {
+    public void initListener(final DistributedDataStoreInterface dataStore, final LogicalDatastoreType type) {
         registrations.put(type, dataStore.registerShardConfigListener(
                 ClusterUtils.SHARD_LIST_PATH, new ShardConfigHandler(memberName, type, handlingActor)));
     }