commit | 4b0ca2cfb1670e7d62e61c019dcfdc09665e948c | [log] [tgz] |
---|---|---|
author | Yuta HIGUCHI <y-higuchi@onlab.us> | Thu Oct 30 01:17:36 2014 -0700 |
committer | Yuta HIGUCHI <y-higuchi@onlab.us> | Thu Oct 30 08:21:27 2014 -0700 |
tree | 716ef00e11cd25f4c8cea97a05c88c31a5640e79 | |
parent | f1d159a6b57882d36c2d388b22bd463b955668e9 [diff] |
Add constructor to create empty RoleInfo Change-Id: If16483fb20d8d0010a22982e0d8f20a295017e62
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java b/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java index d3753f5..3e2905e 100644 --- a/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java +++ b/core/api/src/main/java/org/onlab/onos/cluster/RoleInfo.java
@@ -35,6 +35,11 @@ this.backups = ImmutableList.copyOf(backups); } + public RoleInfo() { + this.master = null; + this.backups = ImmutableList.of(); + } + public NodeId master() { return master; } @@ -63,7 +68,7 @@ @Override public int hashCode() { - return Objects.hash(master, backups.hashCode()); + return Objects.hash(master, backups); } @Override