Package org.onosproject.cluster
Interface ClusterStore
-
- All Superinterfaces:
Store<ClusterEvent,ClusterStoreDelegate>
public interface ClusterStore extends Store<ClusterEvent,ClusterStoreDelegate>
Manages inventory of controller cluster nodes; not intended for direct use.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ControllerNode
addNode(NodeId nodeId, IpAddress ip, int tcpPort)
Adds a new controller node to the cluster.java.time.Instant
getLastUpdatedInstant(NodeId nodeId)
Returns the system 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.java.util.Set<Node>
getStorageNodes()
Returns the set of storage nodes.Version
getVersion(NodeId nodeId)
Returns the version of the specified controller node.void
markFullyStarted(boolean started)
Marks the current node as fully started.void
removeNode(NodeId nodeId)
Removes the specified node from the inventory of cluster nodes.-
Methods inherited from interface org.onosproject.store.Store
hasDelegate, setDelegate, unsetDelegate
-
-
-
-
Method Detail
-
getLocalNode
ControllerNode getLocalNode()
Returns the local controller node.- Returns:
- local controller instance
-
getStorageNodes
java.util.Set<Node> getStorageNodes()
Returns the set of storage nodes.- Returns:
- set of storage nodes
-
getNodes
java.util.Set<ControllerNode> getNodes()
Returns the set of current cluster members.- Returns:
- set of cluster members
-
getNode
ControllerNode getNode(NodeId nodeId)
Returns the specified controller node.- Parameters:
nodeId
- controller instance identifier- Returns:
- controller instance
-
getState
ControllerNode.State getState(NodeId nodeId)
Returns the availability state of the specified controller node.- Parameters:
nodeId
- controller instance identifier- Returns:
- availability state
-
getVersion
Version getVersion(NodeId nodeId)
Returns the version of the specified controller node.- Parameters:
nodeId
- controller instance identifier- Returns:
- controller version
-
markFullyStarted
void markFullyStarted(boolean started)
Marks the current node as fully started.- Parameters:
started
- true indicates all components have been started
-
getLastUpdatedInstant
java.time.Instant getLastUpdatedInstant(NodeId nodeId)
Returns the system when the availability state was last updated.- Parameters:
nodeId
- controller node identifier- Returns:
- system time when the availability state was last updated.
-
addNode
ControllerNode addNode(NodeId nodeId, IpAddress ip, int tcpPort)
Adds a new controller node to the cluster.- Parameters:
nodeId
- controller node identifierip
- node IP listen addresstcpPort
- tcp listen port- Returns:
- newly added node
-
removeNode
void removeNode(NodeId nodeId)
Removes the specified node from the inventory of cluster nodes.- Parameters:
nodeId
- controller instance identifier
-
-