Package org.apache.nifi.cluster.protocol
Interface ClusterCoordinationProtocolSender
- All Known Implementing Classes:
ClusterCoordinationProtocolSenderListener
,StandardClusterCoordinationProtocolSender
public interface ClusterCoordinationProtocolSender
An interface for sending protocol messages from the cluster coordinator to nodes.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Sends a "disconnection request" message to a node.void
notifyNodeStatusChange
(Set<NodeIdentifier> nodesToNotify, NodeStatusChangeMessage msg) Notifies all nodes in the given set that a node in the cluster has a new statusvoid
offload
(OffloadMessage msg) Sends an "offload request" message to a node.requestNodeConnectionStatus
(String hostname, int port) Sends a request to the given hostname and port to request its connection statusSends a "reconnection request" message to a node.void
setBulletinRepository
(BulletinRepository bulletinRepository) Sets theBulletinRepository
that can be used to report bulletins
-
Method Details
-
requestReconnection
ReconnectionResponseMessage requestReconnection(ReconnectionRequestMessage msg) throws ProtocolException Sends a "reconnection request" message to a node.- Parameters:
msg
- a message- Returns:
- the response
- Throws:
ProtocolException
- if communication failed
-
offload
Sends an "offload request" message to a node.- Parameters:
msg
- a message- Throws:
ProtocolException
- if communication failed
-
disconnect
Sends a "disconnection request" message to a node.- Parameters:
msg
- a message- Throws:
ProtocolException
- if communication failed
-
setBulletinRepository
Sets theBulletinRepository
that can be used to report bulletins- Parameters:
bulletinRepository
- repo
-
notifyNodeStatusChange
Notifies all nodes in the given set that a node in the cluster has a new status- Parameters:
nodesToNotify
- the nodes that should be notified of the changemsg
- the message that indicates which node's status changed and what it changed to
-
requestNodeConnectionStatus
Sends a request to the given hostname and port to request its connection status- Returns:
- the connection status returned from the node at the given hostname invalid input: '&' port
-