Bug 7521: Convert byte[] to ShardManagerSnapshot in DatastoreSnapshot
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / shardmanager / ShardManagerSnapshot.java
index 78dc1c2..46fccc7 100644 (file)
@@ -15,17 +15,19 @@ import javax.annotation.Nonnull;
 
 /**
  * Persisted data of the ShardManager.
+ *
+ * @deprecated Use {@link org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot} instead.
  */
-// FIXME: make this package-protected once forShardList is removed.
+@Deprecated
 public final class ShardManagerSnapshot implements Serializable {
     private static final long serialVersionUID = 1L;
     private final List<String> shardList;
 
-    ShardManagerSnapshot(final @Nonnull List<String> shardList) {
+    ShardManagerSnapshot(@Nonnull final List<String> shardList) {
         this.shardList = ImmutableList.copyOf(shardList);
     }
 
-    List<String> getShardList() {
+    public List<String> getShardList() {
         return this.shardList;
     }
 
@@ -40,6 +42,10 @@ public final class ShardManagerSnapshot implements Serializable {
         return new ShardManagerSnapshot(shardList);
     }
 
+    private Object readResolve() {
+        return new org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot(shardList);
+    }
+
     @Override
     public String toString() {
         return "ShardManagerSnapshot [ShardList = " + shardList + " ]";

©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.