Add LeaderStateChanged notification 28/16328/5
authorTom Pantelis <tpanteli@brocade.com>
Tue, 24 Mar 2015 17:55:27 +0000 (13:55 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 24 Mar 2015 18:50:08 +0000 (14:50 -0400)
commitb57b5bca2d4d04b0e317972b081271bf35c2c818
tree6f9d65a3df4acbc1b2b1ceb32d79cc622d8cbced
parent00cc355c0c58e999ffebd531bca3a507e150e441
Add LeaderStateChanged notification

For upcoming work, the ShardManager will need to know a shard's
leaderId and, eventually, version. In the RaftActor, when the
behavior's leaderId changes, it now sends a LeaderStateChanged message
to the RoleChangedNotifier actor. The ShardManager will listen for
LeaderStateChanged messages (in another patch).

Change-Id: I53e2d7cae8fd19f96650546af395f82189a09fd8
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/test/java/org/opendaylight/controller/cluster/raft/RaftActorTest.java
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/LeaderStateChanged.java [new file with mode: 0644]
opendaylight/md-sal/sal-clustering-commons/src/main/java/org/opendaylight/controller/cluster/notifications/RoleChangeNotifier.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/RoleChangeNotifierTest.java