Bug 2194: Find primary shard on remote ShardManager 94/16194/12
authorTom Pantelis <tpanteli@brocade.com>
Wed, 25 Mar 2015 04:07:39 +0000 (00:07 -0400)
committerTom Pantelis <tpanteli@brocade.com>
Wed, 25 Mar 2015 04:07:39 +0000 (00:07 -0400)
commitc9d0ae2a8ce525d150f360cf49f21b7c0187cfbf
tree80f966feb339dd57773c5c7caab2e2f8b74ec431
parent468b9523001807db03b3a545328ac9bf819278c7
Bug 2194: Find primary shard on remote ShardManager

If there is no local shard, the ShardManager now forwards the FindPrimary
message to another ShardManager member.

I changed the FindPrimary and PrimaryFound messages to Serializable.
Previously they implemented SerializableMessage but they didn't have
equivalent protobuff messages so they couldn't be sent over the wire.
These are simple messages and we don't need protobuff.

I also obsoleted the ActorNotInitialized and PrimaryNotFound messages as
we also have equivalent exception classes (which are inhently
Serializable) so the former messages are redundant. This avoids
translation in ActorContext#findPrimaryShardAsync.

Change-Id: I5762ec1dafb9aa12ee8230efe245b154b0bb9b72
Signed-off-by: Tom Pantelis <tpanteli@brocade.com>
12 files changed:
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/ActorNotInitialized.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/FindPrimary.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryFound.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/PrimaryNotFound.java [deleted file]
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/utils/ActorContext.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/DataChangeListenerRegistrationProxyTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/ShardManagerTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/ActorContextTest.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockClusterWrapper.java
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/utils/MockConfiguration.java
opendaylight/md-sal/sal-distributed-datastore/src/test/resources/application.conf