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=3d1bebeb921c7ab096059ca5babb39afb4dfc273;hb=546cd1fd100dbaa36908b22c2f422320dbd8c4b2;hp=1780bb78b324d6172b482f7212c870997ff222ec;hpb=4d15b2022b97238fa9da4df4239f88c619b2e264;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 1780bb78b3..3d1bebeb92 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 @@ -10,20 +10,20 @@ package org.opendaylight.controller.cluster.datastore; import akka.actor.ActorContext; import akka.actor.ActorRef; import akka.actor.Props; -import javax.annotation.concurrent.NotThreadSafe; -import org.opendaylight.controller.cluster.datastore.utils.Dispatchers; +import edu.umd.cs.findbugs.annotations.SuppressFBWarnings; +import org.opendaylight.controller.cluster.common.actor.Dispatchers; import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate; import org.slf4j.Logger; import org.slf4j.LoggerFactory; /** * Abstract base class for a ShardDataTreeNotificationPublisher that offloads the generation and publication - * of data tree notifications to an actor. + * of data tree notifications to an actor. This class is NOT thread-safe. * * @author Thomas Pantelis */ -@NotThreadSafe abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements ShardDataTreeNotificationPublisher { + @SuppressFBWarnings("SLF4J_LOGGER_SHOULD_BE_PRIVATE") protected final Logger log = LoggerFactory.getLogger(getClass()); private final ActorContext actorContext; @@ -31,8 +31,8 @@ abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements S private final String logContext; private ActorRef publisherActor; - protected AbstractShardDataTreeNotificationPublisherActorProxy(ActorContext actorContext, String actorName, - String logContext) { + protected AbstractShardDataTreeNotificationPublisherActorProxy(final ActorContext actorContext, + final String actorName, final String logContext) { this.actorContext = actorContext; this.actorName = actorName; this.logContext = logContext; @@ -49,7 +49,7 @@ abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements S } @Override - public void publishChanges(DataTreeCandidate candidate) { + public void publishChanges(final DataTreeCandidate candidate) { publisherActor().tell(new ShardDataTreeNotificationPublisherActor.PublishNotifications(candidate), ActorRef.noSender()); } @@ -58,8 +58,7 @@ abstract class AbstractShardDataTreeNotificationPublisherActorProxy implements S if (publisherActor == null) { String dispatcher = new Dispatchers(actorContext.system().dispatchers()).getDispatcherPath( Dispatchers.DispatcherType.Notification); - publisherActor = actorContext.actorOf(props().withDispatcher(dispatcher).withMailbox( - org.opendaylight.controller.cluster.datastore.utils.ActorContext.BOUNDED_MAILBOX), actorName); + publisherActor = actorContext.actorOf(props().withDispatcher(dispatcher), actorName); log.debug("{}: Created publisher actor {} with name {}", logContext, publisherActor, actorName); }