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;
11 import com.google.common.base.Preconditions;
12 import java.io.ObjectStreamException;
13 import java.io.Serializable;
14 import java.util.ArrayList;
15 import java.util.List;
16 import javax.annotation.Nonnull;
19 * Persisted data of the ShardManager.
21 * @deprecated Use {@link org.opendaylight.controller.cluster.datastore.shardmanager.ShardManagerSnapshot} instead.
22 * This class is scheduled for removal once persistence migration from Beryllium is no longer needed.
25 public class ShardManagerSnapshot implements Serializable {
26 private static final long serialVersionUID = 1L;
27 private final List<String> shardList;
29 public ShardManagerSnapshot(@Nonnull List<String> shardList) {
30 this.shardList = new ArrayList<>(Preconditions.checkNotNull(shardList));
33 public List<String> getShardList() {
34 return this.shardList;
38 public String toString() {
39 return "ShardManagerSnapshot [ShardList = " + shardList + " ]";
42 private Object readResolve() throws ObjectStreamException {
43 return new org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot(shardList);