Sho SHIMIZU
Committed by Gerrit Code Review

Insert a blank line after the description in Javadoc

Change-Id: Id83ef1bf434e3f99fd2aedd91f10da0d7f98e4cb
......@@ -62,6 +62,7 @@ public class Leadership {
/**
* The topic for which this leadership applies.
*
* @return leadership topic.
*/
public String topic() {
......@@ -70,6 +71,7 @@ public class Leadership {
/**
* The nodeId of leader for this topic.
*
* @return leader node.
*/
public NodeId leader() {
......@@ -108,6 +110,7 @@ public class Leadership {
* clock skew, relying on this value for determining event ordering
* is discouraged. Epoch is more appropriate for determining
* event ordering.
*
* @return elected time.
*/
public long electedTime() {
......
......@@ -30,6 +30,7 @@ public interface LeadershipService {
/**
* Returns the current leader for the topic.
*
* @param path topic
* @return nodeId of the leader, null if so such topic exists.
*/
......@@ -37,6 +38,7 @@ public interface LeadershipService {
/**
* Returns the current leadership info for the topic.
*
* @param path topic
* @return leadership info or null if so such topic exists.
*/
......@@ -44,6 +46,7 @@ public interface LeadershipService {
/**
* Returns the set of topics owned by the specified node.
*
* @param nodeId node Id.
* @return set of topics for which this node is the current leader.
*/
......@@ -51,30 +54,35 @@ public interface LeadershipService {
/**
* Joins the leadership contest.
*
* @param path topic for which this controller node wishes to be a leader.
*/
void runForLeadership(String path);
/**
* Withdraws from a leadership contest.
*
* @param path topic for which this controller node no longer wishes to be a leader.
*/
void withdraw(String path);
/**
* Returns the current leader board.
*
* @return mapping from topic to leadership info.
*/
Map<String, Leadership> getLeaderBoard();
/**
* Returns the candidates for all known topics.
*
* @return A map of topics to lists of NodeIds.
*/
Map<String, List<NodeId>> getCandidates();
/**
* Returns the candidates for a given topic.
*
* @param path topic
* @return A lists of NodeIds, which may be empty.
*/
......@@ -82,12 +90,14 @@ public interface LeadershipService {
/**
* Registers a event listener to be notified of leadership events.
*
* @param listener listener that will asynchronously notified of leadership events.
*/
void addListener(LeadershipEventListener listener);
/**
* Unregisters a event listener for leadership events.
*
* @param listener listener to be removed.
*/
void removeListener(LeadershipEventListener listener);
......