BUG-2138: Create DistributedShardFrontend
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardManagerSnapshot.java
1 /*
2  * Copyright (c) 2015 Dell Inc. and others.  All rights reserved.
3  *
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
7  */
8
9 package org.opendaylight.controller.cluster.datastore;
10
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.Collections;
16 import java.util.List;
17 import javax.annotation.Nonnull;
18
19 /**
20  * Persisted data of the ShardManager.
21  *
22  * @deprecated Use {@link org.opendaylight.controller.cluster.datastore.shardmanager.ShardManagerSnapshot} instead.
23  *             This class is scheduled for removal once persistence migration from Beryllium is no longer needed.
24  */
25 @Deprecated
26 public class ShardManagerSnapshot implements Serializable {
27     private static final long serialVersionUID = 1L;
28     private final List<String> shardList;
29
30     public ShardManagerSnapshot(@Nonnull List<String> shardList) {
31         this.shardList = new ArrayList<>(Preconditions.checkNotNull(shardList));
32     }
33
34     public List<String> getShardList() {
35         return this.shardList;
36     }
37
38     @Override
39     public String toString() {
40         return "ShardManagerSnapshot [ShardList = " + shardList + " ]";
41     }
42
43     private Object readResolve() throws ObjectStreamException {
44         return new org.opendaylight.controller.cluster.datastore.persisted.ShardManagerSnapshot(shardList,
45                 Collections.emptyMap());
46     }
47 }

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