import akka.actor.ActorContext;
import akka.actor.ActorRef;
import akka.actor.Props;
-import javax.annotation.concurrent.NotThreadSafe;
+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;
/**
* 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;
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;
}
@Override
- public void publishChanges(DataTreeCandidate candidate) {
+ public void publishChanges(final DataTreeCandidate candidate) {
publisherActor().tell(new ShardDataTreeNotificationPublisherActor.PublishNotifications(candidate),
ActorRef.noSender());
}