import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Cancellable;
import akka.actor.Scheduler;
import com.google.common.annotations.Beta;
import akka.actor.ActorRef;
import akka.actor.ActorSystem;
import akka.actor.Cancellable;
import akka.actor.Scheduler;
import com.google.common.annotations.Beta;
import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
import org.opendaylight.controller.cluster.common.actor.Dispatchers;
import org.opendaylight.controller.cluster.io.FileBackedOutputStreamFactory;
import org.opendaylight.controller.cluster.access.concepts.ClientIdentifier;
import org.opendaylight.controller.cluster.common.actor.Dispatchers;
import org.opendaylight.controller.cluster.io.FileBackedOutputStreamFactory;
ClientActorContext(final ActorRef self, final String persistenceId, final ActorSystem system,
final ClientIdentifier identifier, final ClientActorConfig config) {
super(self, persistenceId);
ClientActorContext(final ActorRef self, final String persistenceId, final ActorSystem system,
final ClientIdentifier identifier, final ClientActorConfig config) {
super(self, persistenceId);
- this.identifier = Preconditions.checkNotNull(identifier);
- this.scheduler = Preconditions.checkNotNull(system).scheduler();
+ this.identifier = requireNonNull(identifier);
+ this.scheduler = requireNonNull(system).scheduler();
this.executionContext = system.dispatcher();
this.dispatchers = new Dispatchers(system.dispatchers());
this.executionContext = system.dispatcher();
this.dispatchers = new Dispatchers(system.dispatchers());
messageSlicer = MessageSlicer.builder().messageSliceSize(config.getMaximumMessageSliceSize())
.logContext(persistenceId).expireStateAfterInactivity(config.getRequestTimeout(), TimeUnit.NANOSECONDS)
messageSlicer = MessageSlicer.builder().messageSliceSize(config.getMaximumMessageSliceSize())
.logContext(persistenceId).expireStateAfterInactivity(config.getRequestTimeout(), TimeUnit.NANOSECONDS)
- public <T extends BackendInfo> void executeInActor(@Nonnull final InternalCommand<T> command) {
- self().tell(Preconditions.checkNotNull(command), ActorRef.noSender());
+ public <T extends BackendInfo> void executeInActor(final @NonNull InternalCommand<T> command) {
+ self().tell(requireNonNull(command), ActorRef.noSender());
- return scheduler.scheduleOnce(Preconditions.checkNotNull(delay), self(), Preconditions.checkNotNull(command),
+ return scheduler.scheduleOnce(requireNonNull(delay), self(), requireNonNull(command),