public class ClusterManagerProtocolSenderImpl extends Object implements ClusterManagerProtocolSender
| Modifier and Type | Field and Description |
|---|---|
private BulletinRepository |
bulletinRepository |
private int |
handshakeTimeoutSeconds |
private ProtocolContext<ProtocolMessage> |
protocolContext |
private SocketConfiguration |
socketConfiguration |
| Constructor and Description |
|---|
ClusterManagerProtocolSenderImpl(SocketConfiguration socketConfiguration,
ProtocolContext<ProtocolMessage> protocolContext) |
| Modifier and Type | Method and Description |
|---|---|
void |
assignPrimaryRole(PrimaryRoleAssignmentMessage msg)
Assigns the primary role to a node.
|
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() |
FlowResponseMessage |
requestFlow(FlowRequestMessage msg)
Requests the data flow from a node.
|
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
private volatile BulletinRepository bulletinRepository
public ClusterManagerProtocolSenderImpl(SocketConfiguration socketConfiguration, ProtocolContext<ProtocolMessage> protocolContext)
public void setBulletinRepository(BulletinRepository bulletinRepository)
ClusterManagerProtocolSenderBulletinRepository that can be used to report bulletinssetBulletinRepository in interface ClusterManagerProtocolSenderpublic FlowResponseMessage requestFlow(FlowRequestMessage msg) throws ProtocolException
requestFlow in interface ClusterManagerProtocolSendermsg - a message@throws - ProtocolException if the message failed to be sent or the response was malformedProtocolException - if communication failedpublic ReconnectionResponseMessage requestReconnection(ReconnectionRequestMessage msg) throws ProtocolException
requestReconnection in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if the message failed to be sent or the response was malformedpublic void disconnect(DisconnectMessage msg) throws ProtocolException
disconnect in interface ClusterManagerProtocolSendermsg - a messageProtocolException - if the message failed to be sentpublic void assignPrimaryRole(PrimaryRoleAssignmentMessage msg) throws ProtocolException
assignPrimaryRole in interface ClusterManagerProtocolSendermsg - 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)
Copyright © 2015 Apache NiFi(incubating) Project. All rights reserved.