Add LeaderTransitioning message to RaftActor 07/31507/3
authorTom Pantelis <tpanteli@brocade.com>
Tue, 15 Dec 2015 22:23:01 +0000 (17:23 -0500)
committerTom Pantelis <tpanteli@brocade.com>
Mon, 21 Dec 2015 11:31:58 +0000 (06:31 -0500)
commit156a5dd91d9cb249d36c2b88c71b32b83d9332bf
tree38b0a4689ba90979e73ad1b9252ecc5c797aa5c3
parent671ee25af46a1f852548de03cd0d3b8f74d7b7ba
Add LeaderTransitioning message to RaftActor

Adds a LeaderTransitioning message that sends a LeaderStateChanged
message to the RoleChangeNotifier actor with a null leaderId. This will
be used in subsequent patches for leadership transfer. This message will
be sent from the leader to its followers. The resulting
LeaderStateChanged message causes the ShardManager to clear its cached
leader info for the shard so subsequent transactions will wait for the new
leader to come on line.

Change-Id: I2a91374992687a478af1c76b74128e7b0f813c45
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/base/messages/LeaderTransitioning.java [new file with mode: 0644]
opendaylight/md-sal/sal-akka-raft/src/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java