@Service
public class ClusterManager
extends org.onosproject.event.AbstractListenerManager<org.onosproject.cluster.ClusterEvent,org.onosproject.cluster.ClusterEventListener>
implements org.onosproject.cluster.ClusterService, org.onosproject.cluster.ClusterAdminService
| Modifier and Type | Field and Description |
|---|---|
protected org.onosproject.cluster.ClusterMetadataAdminService |
clusterMetadataAdminService |
protected org.onosproject.cluster.ClusterMetadataService |
clusterMetadataService |
static String |
INSTANCE_ID_NULL |
protected org.onosproject.cluster.ClusterStore |
store |
protected org.apache.karaf.system.SystemService |
systemService |
| Constructor and Description |
|---|
ClusterManager() |
| Modifier and Type | Method and Description |
|---|---|
void |
activate() |
org.onosproject.cluster.ControllerNode |
addNode(org.onosproject.cluster.NodeId nodeId,
org.onlab.packet.IpAddress ip,
int tcpPort) |
void |
deactivate() |
void |
formCluster(Set<org.onosproject.cluster.ControllerNode> nodes) |
void |
formCluster(Set<org.onosproject.cluster.ControllerNode> nodes,
int partitionSize) |
org.joda.time.DateTime |
getLastUpdated(org.onosproject.cluster.NodeId nodeId) |
org.onosproject.cluster.ControllerNode |
getLocalNode() |
org.onosproject.cluster.ControllerNode |
getNode(org.onosproject.cluster.NodeId nodeId) |
Set<org.onosproject.cluster.ControllerNode> |
getNodes() |
org.onosproject.cluster.ControllerNode.State |
getState(org.onosproject.cluster.NodeId nodeId) |
void |
markFullyStarted(boolean started) |
void |
removeNode(org.onosproject.cluster.NodeId nodeId) |
addListener, bindEventDispatcher, post, removeListener, unbindEventDispatcherpublic static final String INSTANCE_ID_NULL
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterMetadataService clusterMetadataService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterMetadataAdminService clusterMetadataAdminService
@Reference(cardinality=MANDATORY_UNARY) protected org.onosproject.cluster.ClusterStore store
@Reference(cardinality=MANDATORY_UNARY) protected org.apache.karaf.system.SystemService systemService
@Activate public void activate()
@Deactivate public void deactivate()
public org.onosproject.cluster.ControllerNode getLocalNode()
getLocalNode in interface org.onosproject.cluster.ClusterServicepublic Set<org.onosproject.cluster.ControllerNode> getNodes()
getNodes in interface org.onosproject.cluster.ClusterServicepublic org.onosproject.cluster.ControllerNode getNode(org.onosproject.cluster.NodeId nodeId)
getNode in interface org.onosproject.cluster.ClusterServicepublic org.onosproject.cluster.ControllerNode.State getState(org.onosproject.cluster.NodeId nodeId)
getState in interface org.onosproject.cluster.ClusterServicepublic void markFullyStarted(boolean started)
markFullyStarted in interface org.onosproject.cluster.ClusterAdminServicepublic org.joda.time.DateTime getLastUpdated(org.onosproject.cluster.NodeId nodeId)
getLastUpdated in interface org.onosproject.cluster.ClusterServicepublic void formCluster(Set<org.onosproject.cluster.ControllerNode> nodes)
formCluster in interface org.onosproject.cluster.ClusterAdminServicepublic void formCluster(Set<org.onosproject.cluster.ControllerNode> nodes, int partitionSize)
formCluster in interface org.onosproject.cluster.ClusterAdminServicepublic org.onosproject.cluster.ControllerNode addNode(org.onosproject.cluster.NodeId nodeId,
org.onlab.packet.IpAddress ip,
int tcpPort)
addNode in interface org.onosproject.cluster.ClusterAdminServicepublic void removeNode(org.onosproject.cluster.NodeId nodeId)
removeNode in interface org.onosproject.cluster.ClusterAdminService