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
9 package org.opendaylight.controller.cluster.datastore.shardmanager;
11 import com.google.common.collect.ImmutableList;
12 import java.io.Serializable;
13 import java.util.Collections;
14 import java.util.List;
15 import javax.annotation.Nonnull;
18 * Persisted data of the ShardManager.
20 * @deprecated Use {@link org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot} instead.
23 public final class ShardManagerSnapshot implements Serializable {
24 private static final long serialVersionUID = 1L;
25 private final List<String> shardList;
27 ShardManagerSnapshot(@Nonnull final List<String> shardList) {
28 this.shardList = ImmutableList.copyOf(shardList);
31 public List<String> getShardList() {
32 return this.shardList;
36 * Creates a ShardManagerSnapshot.
38 * @deprecated This method is for migration only and should me removed once
39 * org.opendaylight.controller.cluster.datastore.ShardManagerSnapshot is removed.
42 public static ShardManagerSnapshot forShardList(final @Nonnull List<String> shardList) {
43 return new ShardManagerSnapshot(shardList);
46 private Object readResolve() {
47 return new org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot(shardList,
48 Collections.emptyMap());
52 public String toString() {
53 return "ShardManagerSnapshot [ShardList = " + shardList + " ]";