Package org.onosproject.cluster
Interface ClusterService
-
- All Superinterfaces:
ListenerService<ClusterEvent,ClusterEventListener>
- All Known Subinterfaces:
ClusterAdminService
public interface ClusterService extends ListenerService<ClusterEvent,ClusterEventListener>
Service for obtaining information about the individual nodes within the controller cluster.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description java.util.Set<Node>
getConsensusNodes()
Returns the set of consensus nodes.default org.joda.time.DateTime
getLastUpdated(NodeId nodeId)
Deprecated.in 1.12.0default java.time.Instant
getLastUpdatedInstant(NodeId nodeId)
Returns the system time when the availability state was last updated.ControllerNode
getLocalNode()
Returns the local controller node.ControllerNode
getNode(NodeId nodeId)
Returns the specified controller node.java.util.Set<ControllerNode>
getNodes()
Returns the set of current cluster members.ControllerNode.State
getState(NodeId nodeId)
Returns the availability state of the specified controller node.Version
getVersion(NodeId nodeId)
Returns the version of the given controller node.default java.lang.String
localStatus(NodeId nodeId)
Returns a human readable form of the system time when the availability state was last updated.-
Methods inherited from interface org.onosproject.event.ListenerService
addListener, removeListener
-
-
-
-
Method Detail
-
getLocalNode
ControllerNode getLocalNode()
Returns the local controller node.- Returns:
- local controller node
-
getNodes
java.util.Set<ControllerNode> getNodes()
Returns the set of current cluster members.- Returns:
- set of cluster members
-
getConsensusNodes
java.util.Set<Node> getConsensusNodes()
Returns the set of consensus nodes.- Returns:
- the set of consensus nodes
-
getNode
ControllerNode getNode(NodeId nodeId)
Returns the specified controller node.- Parameters:
nodeId
- controller node identifier- Returns:
- controller node
-
getState
ControllerNode.State getState(NodeId nodeId)
Returns the availability state of the specified controller node. Note that this does not imply that all the core and application components have been fully activated; only that the node has joined the cluster.- Parameters:
nodeId
- controller node identifier- Returns:
- availability state
-
getVersion
Version getVersion(NodeId nodeId)
Returns the version of the given controller node.- Parameters:
nodeId
- controller node identifier- Returns:
- controller version
-
getLastUpdatedInstant
default java.time.Instant getLastUpdatedInstant(NodeId nodeId)
Returns the system time when the availability state was last updated.- Parameters:
nodeId
- controller node identifier- Returns:
- system time when the availability state was last updated.
-
localStatus
default java.lang.String localStatus(NodeId nodeId)
Returns a human readable form of the system time when the availability state was last updated.- Parameters:
nodeId
- controller node identifier- Returns:
- human readable string for system time when the availability state was last updated.
-
getLastUpdated
@Deprecated default org.joda.time.DateTime getLastUpdated(NodeId nodeId)
Deprecated.in 1.12.0Returns the system time when the availability state was last updated.- Parameters:
nodeId
- controller node identifier- Returns:
- system time when the availability state was last updated.
-
-