X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-akka-raft-example%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fexample%2FExampleActor.java;fp=opendaylight%2Fmd-sal%2Fsal-akka-raft-example%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fcluster%2Fexample%2FExampleActor.java;h=a2bcc8a724f68ec05f2c9c57440084fb8368dcb6;hb=b4bf55727093657662d8c16a50fa85f87978a586;hp=a1916f15002113c2e3a900b7b7be6cfa22c8b35c;hpb=9d4ff4c4045fdef38e3940d336d2825df29c4d65;p=controller.git diff --git a/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java b/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java index a1916f1500..a2bcc8a724 100644 --- a/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java +++ b/opendaylight/md-sal/sal-akka-raft-example/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java @@ -18,7 +18,6 @@ import java.io.OutputStream; import java.io.Serializable; import java.util.HashMap; import java.util.Map; -import javax.annotation.Nonnull; import org.apache.commons.lang3.SerializationUtils; import org.opendaylight.controller.cluster.example.messages.KeyValue; import org.opendaylight.controller.cluster.example.messages.KeyValueSaved; @@ -50,10 +49,9 @@ public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, } private final Map state = new HashMap<>(); - - private long persistIdentifier = 1; private final Optional roleChangeNotifier; + private long persistIdentifier = 1; public ExampleActor(String id, Map peerAddresses, Optional configParams) { @@ -155,16 +153,17 @@ public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, } } - @Override protected void onStateChanged() { + @Override + protected void onStateChanged() { } - @Override public String persistenceId() { + @Override + public String persistenceId() { return getId(); } @Override - @Nonnull protected RaftActorRecoveryCohort getRaftActorRecoveryCohort() { return this; }