BUG-5280: add BackendInfo/BackendInfoResolver
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / databroker / actors / dds / DistributedDataStoreClientBehavior.java
index cacda93cb05b9bfe437755aa2b9ae8afd90f8f70..ff5f8820dda9b90cb7aae48efc2514f697acb65c 100644 (file)
@@ -14,6 +14,7 @@ import java.util.concurrent.CompletionStage;
 import org.opendaylight.controller.cluster.access.concepts.LocalHistoryIdentifier;
 import org.opendaylight.controller.cluster.datastore.actors.client.ClientActorBehavior;
 import org.opendaylight.controller.cluster.datastore.actors.client.ClientActorContext;
+import org.opendaylight.controller.cluster.datastore.utils.ActorContext;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -46,10 +47,12 @@ import org.slf4j.LoggerFactory;
 final class DistributedDataStoreClientBehavior extends ClientActorBehavior implements DistributedDataStoreClient {
     private static final Logger LOG = LoggerFactory.getLogger(DistributedDataStoreClientBehavior.class);
 
+    private final ModuleShardBackendResolver resolver;
     private long nextHistoryId;
 
-    DistributedDataStoreClientBehavior(final ClientActorContext context) {
+    DistributedDataStoreClientBehavior(final ClientActorContext context, final ActorContext actorContext) {
         super(context);
+        resolver = new ModuleShardBackendResolver(actorContext);
     }
 
     //
@@ -105,4 +108,9 @@ final class DistributedDataStoreClientBehavior extends ClientActorBehavior imple
     public void close() {
         context().executeInActor(this::shutdown);
     }
+
+    @Override
+    protected ModuleShardBackendResolver resolver() {
+        return resolver;
+    }
 }