Move SwitchShardBehaviorMessage to shardmanager package 53/36653/4
authorRobert Varga <rovarga@cisco.com>
Wed, 23 Mar 2016 16:17:59 +0000 (17:17 +0100)
committerTom Pantelis <tpanteli@brocade.com>
Tue, 29 Mar 2016 19:53:05 +0000 (19:53 +0000)
This message is only used internally by the ShardManager, move it to its
package and limit visibility.

Change-Id: I4c546f214cfcfa2e460cd6e78131e27a6d3bd4d7
Signed-off-by: Robert Varga <rovarga@cisco.com>
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManager.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerInfo.java
opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/shardmanager/SwitchShardBehavior.java [moved from opendaylight/md-sal/sal-distributed-datastore/src/main/java/org/opendaylight/controller/cluster/datastore/messages/SwitchShardBehavior.java with 79% similarity]
opendaylight/md-sal/sal-distributed-datastore/src/test/java/org/opendaylight/controller/cluster/datastore/shardmanager/ShardManagerTest.java

index dd60dca..197ae82 100644 (file)
@@ -82,7 +82,6 @@ import org.opendaylight.controller.cluster.datastore.messages.RemoteFindPrimary;
 import org.opendaylight.controller.cluster.datastore.messages.RemotePrimaryShardFound;
 import org.opendaylight.controller.cluster.datastore.messages.RemoveShardReplica;
 import org.opendaylight.controller.cluster.datastore.messages.ShardLeaderStateChanged;
-import org.opendaylight.controller.cluster.datastore.messages.SwitchShardBehavior;
 import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext;
 import org.opendaylight.controller.cluster.datastore.utils.Dispatchers;
 import org.opendaylight.controller.cluster.datastore.utils.PrimaryShardInfoFutureCache;
index ae0df0f..e3fba5d 100644 (file)
@@ -14,7 +14,6 @@ import com.google.common.collect.ImmutableList;
 import java.util.Collection;
 import java.util.List;
 import org.opendaylight.controller.cluster.datastore.jmx.mbeans.shardmanager.ShardManagerInfoMBean;
-import org.opendaylight.controller.cluster.datastore.messages.SwitchShardBehavior;
 import org.opendaylight.controller.cluster.raft.RaftState;
 import org.opendaylight.controller.md.sal.common.util.jmx.AbstractMXBean;
 import org.slf4j.Logger;
@@ -6,31 +6,31 @@
  * and is available at http://www.eclipse.org/legal/epl-v10.html
  */
 
-package org.opendaylight.controller.cluster.datastore.messages;
+package org.opendaylight.controller.cluster.datastore.shardmanager;
 
 import com.google.common.base.Preconditions;
 import org.opendaylight.controller.cluster.raft.RaftState;
 
-public final class SwitchShardBehavior {
+final class SwitchShardBehavior {
     private final String shardName;
     private final RaftState newState;
     private final long term;
 
-    public SwitchShardBehavior(String shardName, RaftState newState, long term) {
+    SwitchShardBehavior(String shardName, RaftState newState, long term) {
         this.shardName = Preconditions.checkNotNull(shardName);
         this.newState = Preconditions.checkNotNull(newState);
         this.term = term;
     }
 
-    public String getShardName() {
+    String getShardName() {
         return shardName;
     }
 
-    public RaftState getNewState() {
+    RaftState getNewState() {
         return newState;
     }
 
-    public long getTerm() {
+    long getTerm() {
         return term;
     }
 
index ae281c6..39158e0 100644 (file)
@@ -98,7 +98,6 @@ import org.opendaylight.controller.cluster.datastore.messages.PrimaryShardInfo;
 import org.opendaylight.controller.cluster.datastore.messages.RemotePrimaryShardFound;
 import org.opendaylight.controller.cluster.datastore.messages.RemoveShardReplica;
 import org.opendaylight.controller.cluster.datastore.messages.ShardLeaderStateChanged;
-import org.opendaylight.controller.cluster.datastore.messages.SwitchShardBehavior;
 import org.opendaylight.controller.cluster.datastore.messages.UpdateSchemaContext;
 import org.opendaylight.controller.cluster.datastore.utils.ForwardingActor;
 import org.opendaylight.controller.cluster.datastore.utils.MockClusterWrapper;

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.