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%2Fdatastore%2FAbstractShardDataTreeNotificationPublisherActorProxy.java;h=1780bb78b324d6172b482f7212c870997ff222ec;hb=35624f56612e0b8ca641c2fc5fed25f1c7628e51;hp=6b348fb76f904e6de35e105b0bc46cf796aabe32;hpb=ec870dee9bacb971f11bc747b69e84ac37f5d746;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeNotificationPublisherActorProxy.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeNotificationPublisherActorProxy.java index 6b348fb76f..1780bb78b3 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeNotificationPublisherActorProxy.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/AbstractShardDataTreeNotificationPublisherActorProxy.java @@ -24,13 +24,12 @@ import org.slf4j.LoggerFactory; */ @NotThreadSafe abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements ShardDataTreeNotificationPublisher { - private static final Logger LOG = LoggerFactory.getLogger( - AbstractShardDataTreeNotificationPublisherActorProxy.class); + protected final Logger log = LoggerFactory.getLogger(getClass()); private final ActorContext actorContext; private final String actorName; private final String logContext; - private ActorRef notifierActor; + private ActorRef publisherActor; protected AbstractShardDataTreeNotificationPublisherActorProxy(ActorContext actorContext, String actorName, String logContext) { @@ -50,21 +49,21 @@ abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements S } @Override - public void publishChanges(DataTreeCandidate candidate, String logContext) { - notifierActor().tell(new ShardDataTreeNotificationPublisherActor.PublishNotifications(candidate), + public void publishChanges(DataTreeCandidate candidate) { + publisherActor().tell(new ShardDataTreeNotificationPublisherActor.PublishNotifications(candidate), ActorRef.noSender()); } - protected final ActorRef notifierActor() { - if (notifierActor == null) { - LOG.debug("Creating actor {}", actorName); - + protected final ActorRef publisherActor() { + if (publisherActor == null) { String dispatcher = new Dispatchers(actorContext.system().dispatchers()).getDispatcherPath( Dispatchers.DispatcherType.Notification); - notifierActor = actorContext.actorOf(props().withDispatcher(dispatcher).withMailbox( + publisherActor = actorContext.actorOf(props().withDispatcher(dispatcher).withMailbox( org.opendaylight.controller.cluster.datastore.utils.ActorContext.BOUNDED_MAILBOX), actorName); + + log.debug("{}: Created publisher actor {} with name {}", logContext, publisherActor, actorName); } - return notifierActor; + return publisherActor; } }