BUG 2187 - Persisting shard list in ShardManager
[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.Serializable;
13 import java.util.ArrayList;
14 import java.util.List;
15 import javax.annotation.Nonnull;
16
17 /**
18  * Persisted data of the ShardManager
19  */
20
21 public class ShardManagerSnapshot implements Serializable {
22     private static final long serialVersionUID = 1L;
23     private final List<String> shardList;
24
25     public ShardManagerSnapshot(@Nonnull List<String> shardList) {
26         this.shardList = new ArrayList<>(Preconditions.checkNotNull(shardList));
27     }
28
29     public List<String> getShardList() {
30         return this.shardList;
31     }
32
33     @Override
34     public String toString() {
35         return "ShardManagerSnapshot [ShardList = " + shardList + " ]";
36     }
37 }

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