From: Moiz Raja Date: Fri, 10 Apr 2015 16:08:56 +0000 (+0000) Subject: Merge "Add generic arguments" X-Git-Tag: release/lithium~284 X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=commitdiff_plain;h=9f1061c46af5220ad95d8d0b94411ba2fd832a50 Merge "Add generic arguments" --- 9f1061c46af5220ad95d8d0b94411ba2fd832a50 diff --cc opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java index 77eaac2cfe,bafa116b55..5ab3f69bea --- a/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java +++ b/opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java @@@ -37,9 -34,9 +37,9 @@@ import org.opendaylight.controller.clus /** * A sample actor showing how the RaftActor is to be extended */ -public class ExampleActor extends RaftActor { +public class ExampleActor extends RaftActor implements RaftActorRecoveryCohort, RaftActorSnapshotCohort { - private final Map state = new HashMap(); + private final Map state = new HashMap<>(); private long persistIdentifier = 1; private final Optional roleChangeNotifier; @@@ -132,11 -128,10 +132,11 @@@ getSelf().tell(new CaptureSnapshotReply(bs.toByteArray()), null); } - @Override protected void applySnapshot(byte [] snapshot) { + @Override + public void applySnapshot(byte [] snapshot) { state.clear(); try { - state.putAll((HashMap) toObject(snapshot)); + state.putAll((HashMap) toObject(snapshot)); } catch (Exception e) { LOG.error("Exception in applying snapshot", e); }