Fix warnings/javadocs in sal-distributed-datastore
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / shardmanager / 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.shardmanager;
10
11 import com.google.common.collect.ImmutableList;
12 import java.io.Serializable;
13 import java.util.List;
14 import javax.annotation.Nonnull;
15
16 /**
17  * Persisted data of the ShardManager.
18  */
19 // FIXME: make this package-protected once forShardList is removed.
20 public final class ShardManagerSnapshot implements Serializable {
21     private static final long serialVersionUID = 1L;
22     private final List<String> shardList;
23
24     ShardManagerSnapshot(final @Nonnull List<String> shardList) {
25         this.shardList = ImmutableList.copyOf(shardList);
26     }
27
28     List<String> getShardList() {
29         return this.shardList;
30     }
31
32     /**
33      * Creates a ShardManagerSnapshot.
34      *
35      * @deprecated This method is for migration only and should me removed once
36      *             org.opendaylight.controller.cluster.datastore.ShardManagerSnapshot is removed.
37      */
38     @Deprecated
39     public static ShardManagerSnapshot forShardList(final @Nonnull List<String> shardList) {
40         return new ShardManagerSnapshot(shardList);
41     }
42
43     @Override
44     public String toString() {
45         return "ShardManagerSnapshot [ShardList = " + shardList + " ]";
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.