Bug 2210: Fixed initial DCL notification on registration 88/12088/6
authortpantelis <tpanteli@brocade.com>
Thu, 9 Oct 2014 17:54:18 +0000 (13:54 -0400)
committertpantelis <tpanteli@brocade.com>
Mon, 27 Oct 2014 01:57:31 +0000 (21:57 -0400)
commit846b5ae74588943cc5bd176e219809ced07104d6
tree046c220c761793574d30344bc52526b5deabe1e4
parent1bc01a15b1e7811ee59249eab7e815408518e354
Bug 2210: Fixed initial DCL notification on registration

On RegisterChangeListener message, if the shard isn't the leader, the
listener proxy isn't registered with the IMDS yet, instead a
DelayedListenerRegistration innstance is created and added to a
delayedListenerRegistrations list. When the shard becomes the leader, in
onStateChange, the DelayedListenerRegistration instances in the
delayedListenerRegistrations list are registered with the IMDS.

Change-Id: Id5fbfc3e452e9843f6977139d101e71f4022dc0a
Signed-off-by: tpantelis <tpanteli@brocade.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/DataChangeListener.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/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DistributedDataStoreIntegrationTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardTestKit.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockDataChangeListener.java [new file with mode: 0644]
opendaylight/md-sal/samples/toaster-provider/src/main/java/org/opendaylight/controller/sample/toaster/provider/OpendaylightToaster.java