import akka.dispatch.OnComplete;
import akka.pattern.Patterns;
import akka.util.Timeout;
-import com.google.common.base.Optional;
import com.google.common.base.Preconditions;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.Optional;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.TimeUnit;
import org.opendaylight.controller.cluster.access.concepts.MemberName;
localShardFuture.onComplete(new OnComplete<ActorRef>() {
@Override
- public void onComplete(Throwable throwable, ActorRef actorRef) {
+ public void onComplete(final Throwable throwable, final ActorRef actorRef) {
if (throwable != null) {
tryReschedule(throwable);
} else {
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("Local backend for shard[{}] not found, try: {}, rescheduling..", toLookup, retries);
system.scheduler().scheduleOnce(
SHARD_LOOKUP_TASK_INTERVAL, ShardCreationLookupTask.this, system.dispatcher());
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("{} - Leader for shard[{}] backend not found on try: {}, retrying..",
clusterWrapper.getCurrentMemberName(), toLookup, retries);
system.scheduler().scheduleOnce(
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("Frontend for shard[{}] not found on try: {}, retrying..", toLookup, retries);
system.scheduler().scheduleOnce(
SHARD_LOOKUP_TASK_INTERVAL, FrontendLookupTask.this, system.dispatcher());
localShardFuture.onComplete(new OnComplete<ActorRef>() {
@Override
- public void onComplete(Throwable throwable, ActorRef actorRef) {
+ public void onComplete(final Throwable throwable, final ActorRef actorRef) {
if (throwable != null) {
//TODO Shouldn't we check why findLocalShard failed?
LOG.debug("Backend shard[{}] removal lookup successful notifying the registration future",
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("Backend shard[{}] removal lookup failed, shard is still present, try: {}, rescheduling..",
toLookup, retries);
system.scheduler().scheduleOnce(
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("Local backend for prefix configuration shard not found, try: {}, rescheduling..", retries);
system.scheduler().scheduleOnce(
SHARD_LOOKUP_TASK_INTERVAL, ConfigShardLookupTask.this, system.dispatcher());
}
@Override
- void reschedule(int retries) {
+ void reschedule(final int retries) {
LOG.debug("{} - Leader for config shard not found on try: {}, retrying..",
clusterWrapper.getCurrentMemberName(), retries);
system.scheduler().scheduleOnce(