import javax.annotation.Nullable;
import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
import org.opendaylight.mdsal.dom.spi.AbstractDOMDataTreeChangeListenerRegistration;
private static final Logger LOG = LoggerFactory.getLogger(DistributedShardChangePublisher.class);
- private final DistributedDataStore distributedDataStore;
+ private final AbstractDataStore distributedDataStore;
private final YangInstanceIdentifier shardPath;
// This will be useful for signaling back pressure
private final DataTree dataTree;
public DistributedShardChangePublisher(final DataStoreClient client,
- final DistributedDataStore distributedDataStore,
+ final AbstractDataStore distributedDataStore,
final DOMDataTreeIdentifier prefix,
final Map<DOMDataTreeIdentifier, ChildShardContext> childShards) {
this.client = client;
import javax.annotation.Nonnull;
import javax.annotation.concurrent.GuardedBy;
import org.opendaylight.controller.cluster.databroker.actors.dds.DataStoreClient;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.mdsal.dom.api.DOMDataTreeChangeListener;
import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
import org.opendaylight.mdsal.dom.api.DOMDataTreeShard;
private final DistributedShardChangePublisher publisher;
- DistributedShardFrontend(final DistributedDataStore distributedDataStore,
+ DistributedShardFrontend(final AbstractDataStore distributedDataStore,
final DataStoreClient client,
final DOMDataTreeIdentifier shardRoot) {
this.client = Preconditions.checkNotNull(client);
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.DistributedDataStore;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.controller.cluster.datastore.Shard;
import org.opendaylight.controller.cluster.datastore.config.Configuration;
import org.opendaylight.controller.cluster.datastore.config.ModuleShardConfiguration;
private final ShardedDOMDataTree shardedDOMDataTree;
private final ActorSystem actorSystem;
- private final DistributedDataStore distributedOperDatastore;
- private final DistributedDataStore distributedConfigDatastore;
+ private final AbstractDataStore distributedOperDatastore;
+ private final AbstractDataStore distributedConfigDatastore;
private final ActorRef shardedDataTreeActor;
private final MemberName memberName;
private final PrefixedShardConfigUpdateHandler updateHandler;
public DistributedShardedDOMDataTree(final ActorSystemProvider actorSystemProvider,
- final DistributedDataStore distributedOperDatastore,
- final DistributedDataStore distributedConfigDatastore) {
+ final AbstractDataStore distributedOperDatastore,
+ final AbstractDataStore distributedConfigDatastore) {
this.actorSystem = Preconditions.checkNotNull(actorSystemProvider).getActorSystem();
this.distributedOperDatastore = Preconditions.checkNotNull(distributedOperDatastore);
this.distributedConfigDatastore = Preconditions.checkNotNull(distributedConfigDatastore);
createPrefixConfigShard(distributedOperDatastore);
}
- private void createPrefixConfigShard(final DistributedDataStore dataStore) {
+ private void createPrefixConfigShard(final AbstractDataStore dataStore) {
Configuration configuration = dataStore.getActorContext().getConfiguration();
Collection<MemberName> memberNames = configuration.getUniqueMemberNamesForAllShards();
CreateShard createShardMessage =
private void createShardFrontend(final DOMDataTreeIdentifier prefix) {
LOG.debug("Member {}: Creating CDS shard for prefix: {}", memberName, prefix);
final String shardName = ClusterUtils.getCleanShardName(prefix.getRootIdentifier());
- final DistributedDataStore distributedDataStore =
+ final AbstractDataStore distributedDataStore =
prefix.getDatastoreType().equals(org.opendaylight.mdsal.common.api.LogicalDatastoreType.CONFIGURATION)
? distributedConfigDatastore : distributedOperDatastore;
import java.util.concurrent.TimeUnit;
import org.opendaylight.controller.cluster.access.concepts.MemberName;
import org.opendaylight.controller.cluster.common.actor.AbstractUntypedPersistentActor;
+import org.opendaylight.controller.cluster.datastore.AbstractDataStore;
import org.opendaylight.controller.cluster.datastore.ClusterWrapper;
-import org.opendaylight.controller.cluster.datastore.DistributedDataStore;
import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration;
import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
import org.opendaylight.controller.cluster.datastore.utils.ClusterUtils;
// for calls that need specific actor context tied to a datastore use the one provided in the DistributedDataStore
private final ActorContext actorContext;
private final ShardingServiceAddressResolver resolver;
- private final DistributedDataStore distributedConfigDatastore;
- private final DistributedDataStore distributedOperDatastore;
+ private final AbstractDataStore distributedConfigDatastore;
+ private final AbstractDataStore distributedOperDatastore;
private final int lookupTaskMaxRetries;
private final Map<DOMDataTreeIdentifier, ActorProducerRegistration> idToProducer = new HashMap<>();
public static class ShardedDataTreeActorCreator {
private DistributedShardedDOMDataTree shardingService;
- private DistributedDataStore distributedConfigDatastore;
- private DistributedDataStore distributedOperDatastore;
+ private AbstractDataStore distributedConfigDatastore;
+ private AbstractDataStore distributedOperDatastore;
private ActorSystem actorSystem;
private ClusterWrapper cluster;
private int maxRetries;
return cluster;
}
- public DistributedDataStore getDistributedConfigDatastore() {
+ public AbstractDataStore getDistributedConfigDatastore() {
return distributedConfigDatastore;
}
public ShardedDataTreeActorCreator setDistributedConfigDatastore(
- final DistributedDataStore distributedConfigDatastore) {
+ final AbstractDataStore distributedConfigDatastore) {
this.distributedConfigDatastore = distributedConfigDatastore;
return this;
}
- public DistributedDataStore getDistributedOperDatastore() {
+ public AbstractDataStore getDistributedOperDatastore() {
return distributedOperDatastore;
}
public ShardedDataTreeActorCreator setDistributedOperDatastore(
- final DistributedDataStore distributedOperDatastore) {
+ final AbstractDataStore distributedOperDatastore) {
this.distributedOperDatastore = distributedOperDatastore;
return this;
}