2 * Copyright (c) 2015 Dell Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.cluster.datastore.shardmanager;
10 import com.google.common.collect.ImmutableList;
11 import java.io.Serializable;
12 import java.util.List;
13 import org.eclipse.jdt.annotation.NonNull;
17 * Persisted data of the ShardManager.
19 * @deprecated Use {@link org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot} instead.
21 @Deprecated(forRemoval = true)
22 public final class ShardManagerSnapshot implements Serializable {
23 private static final long serialVersionUID = 1L;
24 private final List<String> shardList;
26 ShardManagerSnapshot(final @NonNull List<String> shardList) {
27 this.shardList = ImmutableList.copyOf(shardList);
30 public List<String> getShardList() {
31 return this.shardList;
35 * Creates a ShardManagerSnapshot.
37 * @deprecated This method is for migration only and should me removed once
38 * org.opendaylight.controller.cluster.datastore.ShardManagerSnapshot is removed.
41 public static ShardManagerSnapshot forShardList(final @NonNull List<String> shardList) {
42 return new ShardManagerSnapshot(shardList);
45 private Object readResolve() {
46 return new org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot(shardList);
50 public String toString() {
51 return "ShardManagerSnapshot [ShardList = " + shardList + " ]";