LeadershipService API change: Using NodeId in place of ControllerNode.
Change-Id: I6f688506c3672977456fc6921b26e98be2239632
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/Leadership.java b/core/api/src/main/java/org/onlab/onos/cluster/Leadership.java
index cf247f5..6be7c9b 100644
--- a/core/api/src/main/java/org/onlab/onos/cluster/Leadership.java
+++ b/core/api/src/main/java/org/onlab/onos/cluster/Leadership.java
@@ -10,10 +10,10 @@
public class Leadership {
private final String topic;
- private final ControllerNode leader;
+ private final NodeId leader;
private final long epoch;
- public Leadership(String topic, ControllerNode leader, long epoch) {
+ public Leadership(String topic, NodeId leader, long epoch) {
this.topic = topic;
this.leader = leader;
this.epoch = epoch;
@@ -28,10 +28,10 @@
}
/**
- * The leader for this topic.
+ * The nodeId of leader for this topic.
* @return leader node.
*/
- public ControllerNode leader() {
+ public NodeId leader() {
return leader;
}
diff --git a/core/api/src/main/java/org/onlab/onos/cluster/LeadershipService.java b/core/api/src/main/java/org/onlab/onos/cluster/LeadershipService.java
index bb89572..2709b7f 100644
--- a/core/api/src/main/java/org/onlab/onos/cluster/LeadershipService.java
+++ b/core/api/src/main/java/org/onlab/onos/cluster/LeadershipService.java
@@ -29,9 +29,9 @@
/**
* Gets the most recent leader for the topic.
* @param path topic
- * @return node who is the leader, null if so such topic exists.
+ * @return nodeId of the leader, null if so such topic exists.
*/
- ControllerNode getLeader(String path);
+ NodeId getLeader(String path);
/**
* Joins the leadership contest.