BUG-8327: deprecate sal.core.api.model.SchemaService
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / ChangeShardMembersVotingStatus.java
1 /*
2  * Copyright (c) 2016 Brocade Communications Systems, 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 package org.opendaylight.controller.cluster.datastore.messages;
9
10 import com.google.common.base.Preconditions;
11 import com.google.common.collect.ImmutableMap;
12 import java.util.Map;
13
14 /**
15  * A local message sent to the ShardManager to change the raft voting status for members of a shard.
16  *
17  * @author Thomas Pantelis
18  */
19 public class ChangeShardMembersVotingStatus {
20     private final String shardName;
21     private final Map<String, Boolean> meberVotingStatusMap;
22
23     public ChangeShardMembersVotingStatus(String shardName, Map<String, Boolean> meberVotingStatusMap) {
24         this.shardName = Preconditions.checkNotNull(shardName);
25         this.meberVotingStatusMap = ImmutableMap.copyOf(meberVotingStatusMap);
26     }
27
28     public String getShardName() {
29         return shardName;
30     }
31
32     public Map<String, Boolean> getMeberVotingStatusMap() {
33         return meberVotingStatusMap;
34     }
35
36     @Override
37     public String toString() {
38         return "ChangeShardMembersVotingStatus [shardName=" + shardName + ", meberVotingStatusMap="
39                 + meberVotingStatusMap + "]";
40     }
41
42
43 }