X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fsharding%2FDistributedShardedDOMDataTree.java;fp=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fsharding%2FDistributedShardedDOMDataTree.java;h=e711bd6aa8df2edcd29e9be3409812843f1f4e3c;hp=e0d35580b82a2c8e35e490e660216e72465529b0;hb=f0e8f9a9547dca1e232a7e8d3912a86de69bcc6a;hpb=323593f2e61d16571bc1deedf42e8a4006b59016 diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java index e0d35580b8..e711bd6aa8 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/sharding/DistributedShardedDOMDataTree.java @@ -50,7 +50,7 @@ import org.opendaylight.controller.cluster.ActorSystemProvider; import org.opendaylight.controller.cluster.access.concepts.MemberName; import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient; import org.opendaylight.controller.cluster.databroker.actors.dds.SimpleDataStoreClientActor; -import org.opendaylight.controller.cluster.datastore.AbstractDataStore; +import org.opendaylight.controller.cluster.datastore.DistributedDataStoreInterface; import org.opendaylight.controller.cluster.datastore.Shard; import org.opendaylight.controller.cluster.datastore.config.Configuration; import org.opendaylight.controller.cluster.datastore.config.ModuleShardConfiguration; @@ -114,8 +114,8 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat private final ShardedDOMDataTree shardedDOMDataTree; private final ActorSystem actorSystem; - private final AbstractDataStore distributedOperDatastore; - private final AbstractDataStore distributedConfigDatastore; + private final DistributedDataStoreInterface distributedOperDatastore; + private final DistributedDataStoreInterface distributedConfigDatastore; private final ActorRef shardedDataTreeActor; private final MemberName memberName; @@ -133,8 +133,8 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat private final PrefixedShardConfigUpdateHandler updateHandler; public DistributedShardedDOMDataTree(final ActorSystemProvider actorSystemProvider, - final AbstractDataStore distributedOperDatastore, - final AbstractDataStore distributedConfigDatastore) { + final DistributedDataStoreInterface distributedOperDatastore, + final DistributedDataStoreInterface distributedConfigDatastore) { this.actorSystem = requireNonNull(actorSystemProvider).getActorSystem(); this.distributedOperDatastore = requireNonNull(distributedOperDatastore); this.distributedConfigDatastore = requireNonNull(distributedConfigDatastore); @@ -160,7 +160,7 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat createPrefixConfigShard(distributedOperDatastore); } - private static void createPrefixConfigShard(final AbstractDataStore dataStore) { + private static void createPrefixConfigShard(final DistributedDataStoreInterface dataStore) { Configuration configuration = dataStore.getActorUtils().getConfiguration(); Collection memberNames = configuration.getUniqueMemberNamesForAllShards(); CreateShard createShardMessage = @@ -255,7 +255,7 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat final Future ask = Patterns.ask(shardedDataTreeActor, new StartConfigShardLookup(type), SHARD_FUTURE_TIMEOUT); - ask.onComplete(new OnComplete() { + ask.onComplete(new OnComplete<>() { @Override public void onComplete(final Throwable throwable, final Object result) { if (throwable != null) { @@ -377,8 +377,8 @@ public class DistributedShardedDOMDataTree implements DOMDataTreeService, DOMDat private void createShardFrontend(final DOMDataTreeIdentifier prefix) { LOG.debug("{}: Creating CDS shard for prefix: {}", memberName, prefix); final String shardName = ClusterUtils.getCleanShardName(prefix.getRootIdentifier()); - final AbstractDataStore distributedDataStore = - prefix.getDatastoreType().equals(org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION) + final DistributedDataStoreInterface distributedDataStore = + prefix.getDatastoreType().equals(LogicalDatastoreType.CONFIGURATION) ? distributedConfigDatastore : distributedOperDatastore; try (DOMDataTreeProducer producer = localCreateProducer(Collections.singletonList(prefix))) {