public interface ClusterManager extends NodeInformant
Modifier and Type | Method and Description |
---|---|
void |
deleteNode(String nodeId,
String userDn)
Deletes the node with the given node identifier.
|
BulletinRepository |
getBulletinRepository() |
int |
getHeartbeatMonitoringIntervalSeconds() |
int |
getMaxHeartbeatGapSeconds() |
Node |
getNode(String nodeId) |
List<Event> |
getNodeEvents(String nodeId)
Returns a list of node events for the node with the given identifier.
|
Set<NodeIdentifier> |
getNodeIds(Node.Status... statuses) |
Set<Node> |
getNodes(Node.Status... statuses) |
Node |
getPrimaryNode() |
ProcessGroupStatus |
getProcessGroupStatus(String groupId) |
SystemDiagnostics |
getSystemDiagnostics() |
void |
handleHeartbeat(Heartbeat heartbeat)
Handles a node's heartbeat.
|
ConnectionResponse |
requestConnection(ConnectionRequest request)
Requests a connection to the cluster.
|
void |
requestDisconnection(String nodeId,
String userDn)
Requests the node with the given identifier be disconnected.
|
void |
requestReconnection(String nodeId,
String userDn)
Services reconnection requests for a given node.
|
void |
setPrimaryNode(String nodeId,
String userDn)
Revokes the primary role from the current primary node and assigns the primary role to given given node ID.
|
getNodeInformation
void handleHeartbeat(Heartbeat heartbeat)
heartbeat
- a heartbeatSet<Node> getNodes(Node.Status... statuses)
statuses
- the statuses of the nodesNode getNode(String nodeId)
nodeId
- node identifierSet<NodeIdentifier> getNodeIds(Node.Status... statuses)
statuses
- statusesvoid deleteNode(String nodeId, String userDn) throws UnknownNodeException, IllegalNodeDeletionException
nodeId
- the node identifieruserDn
- the Distinguished Name of the user requesting the node be deleted from the clusterUnknownNodeException
- if the node does not existIllegalNodeDeletionException
- if the node is not in a disconnected stateConnectionResponse requestConnection(ConnectionRequest request)
request
- the requestvoid requestReconnection(String nodeId, String userDn) throws UnknownNodeException, IllegalNodeReconnectionException
nodeId
- a node identifieruserDn
- the Distinguished Name of the user requesting the reconnectionUnknownNodeException
- if the node does not existIllegalNodeReconnectionException
- if the node is not disconnectedvoid requestDisconnection(String nodeId, String userDn) throws UnknownNodeException, IllegalNodeDisconnectionException, NodeDisconnectionException
nodeId
- the node identifieruserDn
- the Distinguished Name of the user requesting the disconnectionUnknownNodeException
- if the node does not existIllegalNodeDisconnectionException
- if the node cannot be disconnected due to the cluster's state (e.g., node is last connected node or node is primary)UnknownNodeException
- if the node does not existIllegalNodeDisconnectionException
- if the node is not disconnectedNodeDisconnectionException
- if the disconnection failedint getHeartbeatMonitoringIntervalSeconds()
int getMaxHeartbeatGapSeconds()
List<Event> getNodeEvents(String nodeId)
nodeId
- the node identifiervoid setPrimaryNode(String nodeId, String userDn) throws UnknownNodeException, IneligiblePrimaryNodeException, PrimaryRoleAssignmentException
nodeId
- the node identifieruserDn
- the Distinguished Name of the user requesting that the Primary Node be assignedUnknownNodeException
- if the node with the given identifier does not existIneligiblePrimaryNodeException
- if the node with the given identifier is not eligible to be the primary nodePrimaryRoleAssignmentException
- if the cluster was unable to change the primary role to the requested nodeNode getPrimaryNode()
BulletinRepository getBulletinRepository()
ProcessGroupStatus getProcessGroupStatus(String groupId)
groupId
- groupIdProcessGroupStatus
that represents the status of all nodes with the given Node.Status
es for the given ProcessGroup id, or null if no nodes exist with the given statusesSystemDiagnostics getSystemDiagnostics()
Copyright © 2016 Apache NiFi Project. All rights reserved.