Refactor raft recovery code to a RaftActorRecoverySupport class 47/17247/6
authorTom Pantelis <tpanteli@brocade.com>
Thu, 26 Mar 2015 10:23:07 +0000 (06:23 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 8 Apr 2015 05:11:34 +0000 (01:11 -0400)
commit5de57714fa057ac80f930c2fcce2758ca0a5f514
treed887eefb45b5493dd6a4af0149077ae01f5a2998
parent2801b4929e60938cdac4c84dff6422e24e93d11d
Refactor raft recovery code to a RaftActorRecoverySupport class

Moved the RaftActor recovery message handling to a new class
RaftActorRecoverySupport. To handle the callbacks to the RaftActor,
the RaftActorRecoverySupport takes a RaftActorRecoveryCohort interface.
The abstract on* methods in RaftActor are now defined in the
RaftActorRecoveryCohort interface. The derived RaftActor class
implements an abstract method to return a RaftActorRecoveryCohort
instance. Shard returns a ShardRecoveryCoordinator instance (modified to
implement RaftActorRecoveryCohort).

Change-Id: I07a068aad277b6f677d7703c4e10686efe0cf0cc
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/example/ExampleActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActor.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoveryCohort.java [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorRecoverySupport.java [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/AbstractRaftActorIntegrationTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/Shard.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardRecoveryCoordinator.java