X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fmd-sal%2Fsal-distributed-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fdatastore%2Fshardmanager%2FShardManagerGetSnapshotReplyActor.java;h=bc06c32fa754978fe697cfbfc8be2e49856cd907;hb=925cb4a228d0fda99c7bfeb432eb25285a223887;hp=a1628bb37c050b0410f96930d8978c7ca5491450;hpb=f86f7e8c204fb19615c45e669a764c623576e1a3;p=controller.git diff --git a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerGetSnapshotReplyActor.java b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerGetSnapshotReplyActor.java index a1628bb37c..bc06c32fa7 100644 --- a/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerGetSnapshotReplyActor.java +++ b/opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerGetSnapshotReplyActor.java @@ -51,18 +51,18 @@ class ShardManagerGetSnapshotReplyActor extends UntypedActor { @Override public void onReceive(Object message) { - if(message instanceof GetSnapshotReply) { + if (message instanceof GetSnapshotReply) { onGetSnapshotReply((GetSnapshotReply)message); - } else if(message instanceof Failure) { + } else if (message instanceof Failure) { LOG.debug("{}: Received {}", params.id, message); params.replyToActor.tell(message, getSelf()); getSelf().tell(PoisonPill.getInstance(), getSelf()); } else if (message instanceof ReceiveTimeout) { String msg = String.format( - "Timed out after %s ms while waiting for snapshot replies from %d shard(s). %d shard(s) %s did not respond.", - params.receiveTimeout.toMillis(), params.shardNames.size(), remainingShardNames.size(), - remainingShardNames); + "Timed out after %s ms while waiting for snapshot replies from %d shard(s). %d shard(s) %s " + + "did not respond.", params.receiveTimeout.toMillis(), params.shardNames.size(), + remainingShardNames.size(), remainingShardNames); LOG.warn("{}: {}", params.id, msg); params.replyToActor.tell(new Failure(new TimeoutException(msg)), getSelf()); getSelf().tell(PoisonPill.getInstance(), getSelf()); @@ -72,15 +72,15 @@ class ShardManagerGetSnapshotReplyActor extends UntypedActor { private void onGetSnapshotReply(GetSnapshotReply getSnapshotReply) { LOG.debug("{}: Received {}", params.id, getSnapshotReply); - ShardIdentifier shardId = ShardIdentifier.builder().fromShardIdString(getSnapshotReply.getId()).build(); + ShardIdentifier shardId = ShardIdentifier.fromShardIdString(getSnapshotReply.getId()); shardSnapshots.add(new ShardSnapshot(shardId.getShardName(), getSnapshotReply.getSnapshot())); remainingShardNames.remove(shardId.getShardName()); - if(remainingShardNames.isEmpty()) { + if (remainingShardNames.isEmpty()) { LOG.debug("{}: All shard snapshots received", params.id); - DatastoreSnapshot datastoreSnapshot = new DatastoreSnapshot(params.datastoreType, params.shardManagerSnapshot, - shardSnapshots); + DatastoreSnapshot datastoreSnapshot = new DatastoreSnapshot(params.datastoreType, + params.shardManagerSnapshot, shardSnapshots); params.replyToActor.tell(datastoreSnapshot, getSelf()); getSelf().tell(PoisonPill.getInstance(), getSelf()); }