use of org.onosproject.cluster.LeadershipEventListener in project onos by opennetworkinglab.
the class SimpleLeadershipManager method runForLeadership.
@Override
public Leadership runForLeadership(String path) {
elections.put(path, true);
Leadership leadership = new Leadership(path, new Leader(localNodeId, 0, 0), Arrays.asList(localNodeId));
for (LeadershipEventListener listener : listeners) {
listener.event(new LeadershipEvent(Type.LEADER_AND_CANDIDATES_CHANGED, leadership));
}
return leadership;
}
Aggregations