@Service
public class DistributedLeadershipStore
extends org.onosproject.store.AbstractStore<org.onosproject.cluster.LeadershipEvent,org.onosproject.cluster.LeadershipStoreDelegate>
implements org.onosproject.cluster.LeadershipStore
LeadershipStore that makes use of a LeaderElector
primitive.| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cluster.ClusterService |
clusterService |
protected org.onosproject.store.service.StorageService |
storageService |
| Constructor and Description |
|---|
DistributedLeadershipStore() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
org.onosproject.cluster.Leadership |
addRegistration(String topic) |
void |
deactivate() |
org.onosproject.cluster.Leadership |
getLeadership(String topic) |
Map<String,org.onosproject.cluster.Leadership> |
getLeaderships() |
boolean |
makeTopCandidate(String topic,
org.onosproject.cluster.NodeId nodeId) |
boolean |
moveLeadership(String topic,
org.onosproject.cluster.NodeId toNodeId) |
void |
removeRegistration(org.onosproject.cluster.NodeId nodeId) |
void |
removeRegistration(String topic) |
hasDelegate, notifyDelegate, notifyDelegate, setDelegate, unsetDelegate@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterService clusterService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.store.service.StorageService storageService
@Activate public void activate()
@Deactivate public void deactivate()
public org.onosproject.cluster.Leadership addRegistration(String topic)
addRegistration in interface org.onosproject.cluster.LeadershipStorepublic void removeRegistration(String topic)
removeRegistration in interface org.onosproject.cluster.LeadershipStorepublic void removeRegistration(org.onosproject.cluster.NodeId nodeId)
removeRegistration in interface org.onosproject.cluster.LeadershipStorepublic boolean moveLeadership(String topic, org.onosproject.cluster.NodeId toNodeId)
moveLeadership in interface org.onosproject.cluster.LeadershipStorepublic boolean makeTopCandidate(String topic, org.onosproject.cluster.NodeId nodeId)
makeTopCandidate in interface org.onosproject.cluster.LeadershipStorepublic org.onosproject.cluster.Leadership getLeadership(String topic)
getLeadership in interface org.onosproject.cluster.LeadershipStoreCopyright © 2016. All rights reserved.