X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatabroker%2Factors%2Fdds%2FDistributedDataStoreClientBehavior.java;h=eb1dd17bfd9438fc6adff5351db71527d90b3453;hb=refs%2Fchanges%2F99%2F47499%2F3;hp=dd4f1aadc6ef702ac61949d17cc6ada2a37b3630;hpb=1d34f75864ac09d31ef0f7b4ef59f7434167ae15;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java index dd4f1aadc6..eb1dd17bfd 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/databroker/actors/dds/DistributedDataStoreClientBehavior.java @@ -29,21 +29,26 @@ import org.slf4j.LoggerFactory; * {@link ClientActorBehavior} acting as an intermediary between the backend actors and the DistributedDataStore * frontend. * + *
* This class is not visible outside of this package because it breaks the actor containment. Services provided to * Java world outside of actor containment are captured in {@link DistributedDataStoreClient}. * + *
* IMPORTANT: this class breaks actor containment via methods implementing {@link DistributedDataStoreClient} contract. * When touching internal state, be mindful of the execution context from which execution context, Actor * or POJO, is the state being accessed or modified. * + *
* THREAD SAFETY: this class must always be kept thread-safe, so that both the Actor System thread and the application * threads can run concurrently. All state transitions must be made in a thread-safe manner. When in * doubt, feel free to synchronize on this object. * + *
* PERFORMANCE: this class lies in a performance-critical fast path. All code needs to be concise and efficient, but * performance must not come at the price of correctness. Any optimizations need to be carefully analyzed * for correctness and performance impact. * + *
* TRADE-OFFS: part of the functionality runs in application threads without switching contexts, which makes it ideal
* for performing work and charging applications for it. That has two positive effects:
* - CPU usage is distributed across applications, minimizing work done in the actor thread
@@ -65,7 +70,7 @@ final class DistributedDataStoreClientBehavior extends ClientActorBehavior imple
DistributedDataStoreClientBehavior(final ClientActorContext context, final ActorContext actorContext) {
super(context);
- resolver = new ModuleShardBackendResolver(actorContext);
+ resolver = new ModuleShardBackendResolver(context.getIdentifier(), actorContext);
singleHistory = new SingleClientHistory(this, new LocalHistoryIdentifier(getIdentifier(), 0));
}
@@ -123,6 +128,7 @@ final class DistributedDataStoreClientBehavior extends ClientActorBehavior imple
//
//
+ @SuppressWarnings("checkstyle:IllegalCatch")
private static