Bug 2948: Store DataPersistenceProvider in RaftActorContext 04/17804/5
authorTom Pantelis <tpanteli@brocade.com>
Sat, 4 Apr 2015 03:27:51 +0000 (23:27 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Fri, 10 Apr 2015 22:52:19 +0000 (18:52 -0400)
commit1fcab79755eb00756ad947f2369d82efb0b5a55c
treec5801028703ce12ef4a2a3defd4fe680c46f21de
parentedb47bc56dc36013c1dbb9567212ed0119d14914
Bug 2948: Store DataPersistenceProvider in RaftActorContext

This will make the DataPersistenceProvider accessible to callers that
don't have access to the RaftActor. In particular, the SnapshotManager
will need access from the capture method (subsequent patch). The
DataPersistenceProvider can't be passed to capture b/c it is also
called from AbstractLeader which doesn't have access to the
DataPersistenceProvider.

With thus change we no longer have to pass the DataPersistenceProvider to
the persist and commit methods either.

Change-Id: I187901476f2728e4b7f72238e72006c95c188b55
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
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/RaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/main/java/org/opendaylight/controller/cluster/raft/RaftActorContextImpl.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/MockRaftActorContext.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorRecoverySupportTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorSnapshotMessageSupportTest.java
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/ReplicatedLogImplTest.java