public class StandardClusterCoordinationProtocolSender extends Object implements ClusterCoordinationProtocolSender
| Modifier and Type | Field and Description |
|---|---|
private int |
handshakeTimeoutSeconds |
private ProtocolContext<ProtocolMessage> |
protocolContext |
private SocketConfiguration |
socketConfiguration |
| Constructor and Description |
|---|
StandardClusterCoordinationProtocolSender(SocketConfiguration socketConfiguration,
ProtocolContext<ProtocolMessage> protocolContext) |
| Modifier and Type | Method and Description |
|---|---|
private Socket |
createSocket(NodeIdentifier nodeId,
boolean applyHandshakeTimeout) |
private Socket |
createSocket(String host,
int port,
boolean applyHandshakeTimeout) |
void |
disconnect(DisconnectMessage msg)
Requests a node to disconnect from the cluster.
|
int |
getHandshakeTimeoutSeconds() |
SocketConfiguration |
getSocketConfiguration() |
void |
notifyNodeStatusChange(Set<NodeIdentifier> nodesToNotify,
NodeStatusChangeMessage msg)
Notifies all nodes in the given set that a node in the cluster has a new status
|
ReconnectionResponseMessage |
requestReconnection(ReconnectionRequestMessage msg)
Requests a node to reconnect to the cluster.
|
void |
setBulletinRepository(BulletinRepository bulletinRepository)
Sets the
BulletinRepository that can be used to report bulletins |
private void |
setConnectionHandshakeTimeoutOnSocket(Socket socket) |
void |
setHandshakeTimeout(String handshakeTimeout) |
private final ProtocolContext<ProtocolMessage> protocolContext
private final SocketConfiguration socketConfiguration
private int handshakeTimeoutSeconds
public StandardClusterCoordinationProtocolSender(SocketConfiguration socketConfiguration, ProtocolContext<ProtocolMessage> protocolContext)
public void setBulletinRepository(BulletinRepository bulletinRepository)
ClusterCoordinationProtocolSenderBulletinRepository that can be used to report bulletinssetBulletinRepository in interface ClusterCoordinationProtocolSenderbulletinRepository - repopublic ReconnectionResponseMessage requestReconnection(ReconnectionRequestMessage msg) throws ProtocolException
requestReconnection in interface ClusterCoordinationProtocolSendermsg - a messageProtocolException - if the message failed to be sent or the
response was malformedpublic void disconnect(DisconnectMessage msg) throws ProtocolException
disconnect in interface ClusterCoordinationProtocolSendermsg - a messageProtocolException - if the message failed to be sentprivate void setConnectionHandshakeTimeoutOnSocket(Socket socket) throws SocketException
SocketExceptionpublic SocketConfiguration getSocketConfiguration()
public int getHandshakeTimeoutSeconds()
public void setHandshakeTimeout(String handshakeTimeout)
private Socket createSocket(NodeIdentifier nodeId, boolean applyHandshakeTimeout)
public void notifyNodeStatusChange(Set<NodeIdentifier> nodesToNotify, NodeStatusChangeMessage msg)
ClusterCoordinationProtocolSendernotifyNodeStatusChange in interface ClusterCoordinationProtocolSendernodesToNotify - the nodes that should be notified of the changemsg - the message that indicates which node's status changed and what it changed toCopyright © 2016 Apache NiFi Project. All rights reserved.