BUG-4626: Introduce NormalizedNodeData{Input,Output}
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / SwitchShardBehavior.java
1 /*
2  * Copyright (c) 2015 Cisco 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
9 package org.opendaylight.controller.cluster.datastore.messages;
10
11 public class SwitchShardBehavior {
12     private final String shardName;
13     private final String newState;
14     private final long term;
15
16     public SwitchShardBehavior(String shardName, String newState, long term) {
17         this.shardName = shardName;
18         this.newState = newState;
19         this.term = term;
20     }
21
22     public String getShardName() {
23         return shardName;
24     }
25
26     public String getNewState() {
27         return newState;
28     }
29
30     public long getTerm() {
31         return term;
32     }
33
34     @Override
35     public String toString() {
36         final StringBuilder sb = new StringBuilder("SwitchShardBehavior{");
37         sb.append("shardName='").append(shardName).append('\'');
38         sb.append(", newState='").append(newState).append('\'');
39         sb.append(", term=").append(term);
40         sb.append('}');
41         return sb.toString();
42     }
43 }