commit | fd45d5e929a444aa5003af0caccefa8a6ef87135 | [log] [tgz] |
---|---|---|
author | Madan Jampani <madan@onlab.us> | Mon Apr 20 13:33:21 2015 -0700 |
committer | Gerrit Code Review <gerrit@onlab.us> | Mon Apr 20 23:54:22 2015 +0000 |
tree | e07e076aa55e1a50745a0bd906aade411296a40e | |
parent | e97083c38802ba509d239a77e68ba6c3fec9eb35 [diff] |
Use similar return types for LeadershipService.getCandidates() and LeadershipService.getCandidates(topic) Change-Id: I9aaea9dfa14e4e9916103a61c8e59290ad656aa7
diff --git a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/HazelcastLeadershipService.java b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/HazelcastLeadershipService.java index 220a28d..ddd0b9e 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/HazelcastLeadershipService.java +++ b/core/store/dist/src/main/java/org/onosproject/store/cluster/impl/HazelcastLeadershipService.java
@@ -576,7 +576,7 @@ } @Override - public Map<String, Leadership> getCandidates() { + public Map<String, List<NodeId>> getCandidates() { return null; }
diff --git a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java index 6f498ff..58fd3eb 100644 --- a/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java +++ b/core/store/dist/src/main/java/org/onosproject/store/consistent/impl/DistributedLeadershipManager.java
@@ -166,8 +166,8 @@ } @Override - public Map<String, Leadership> getCandidates() { - return ImmutableMap.copyOf(candidateBoard); + public Map<String, List<NodeId>> getCandidates() { + return Maps.toMap(candidateBoard.keySet(), this::getCandidates); } @Override