public class GridTcpCommunicationClient extends GridAbstractCommunicationClient
metricsLsnr| Constructor and Description |
|---|
GridTcpCommunicationClient(GridNioMetricsListener metricsLsnr,
InetSocketAddress addr,
InetAddress locHost,
long connTimeout,
boolean tcpNoDelay,
int sockRcvBuf,
int sockSndBuf,
int bufSize,
int minBufferedMsgCnt,
double bufSizeRatio,
MessageFormatter formatter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close() |
void |
doHandshake(IgniteInClosure2X<InputStream,OutputStream> handshakeC)
Executes the given handshake closure on opened client passing underlying IO streams.
|
void |
flushIfNeeded(long timeout) |
void |
forceClose()
Forces client close.
|
void |
sendMessage(byte[] data,
int len) |
void |
sendMessage(ByteBuffer data) |
boolean |
sendMessage(UUID nodeId,
Message msg) |
String |
toString() |
async, closed, getIdleTime, markUsed, release, reserve, reservedpublic GridTcpCommunicationClient(GridNioMetricsListener metricsLsnr, InetSocketAddress addr, InetAddress locHost, long connTimeout, boolean tcpNoDelay, int sockRcvBuf, int sockSndBuf, int bufSize, int minBufferedMsgCnt, double bufSizeRatio, MessageFormatter formatter) throws IgniteCheckedException
metricsLsnr - Metrics listener.addr - Address.locHost - Local address.connTimeout - Connect timeout.tcpNoDelay - Value for TCP_NODELAY socket option.sockRcvBuf - Socket receive buffer.sockSndBuf - Socket send buffer.bufSize - Buffer size (or 0 to disable buffer).minBufferedMsgCnt - Minimum buffered message count.bufSizeRatio - Communication buffer size ratio.formatter - Message formatter.IgniteCheckedException - If failed.public void doHandshake(IgniteInClosure2X<InputStream,OutputStream> handshakeC) throws IgniteCheckedException
handshakeC - Handshake.IgniteCheckedException - If handshake failed.public boolean close()
close in interface GridCommunicationClientclose in class GridAbstractCommunicationClientTrue if client has been closed by this call,
false if failed to close client (due to concurrent reservation or concurrent close).public void forceClose()
forceClose in interface GridCommunicationClientforceClose in class GridAbstractCommunicationClientpublic void sendMessage(byte[] data,
int len)
throws IgniteCheckedException
data - Data to send.len - Length.IgniteCheckedException - If failed.public boolean sendMessage(@Nullable UUID nodeId, Message msg) throws IgniteCheckedException
nodeId - Node ID (provided only if versions of local and remote nodes are different).msg - Message to send.True if should try to resend message.IgniteCheckedException - If failed.public void flushIfNeeded(long timeout)
throws IOException
timeout - Timeout.IOException - If failed.public void sendMessage(ByteBuffer data) throws IgniteCheckedException
data - Data to send.IgniteCheckedException - If failed.public String toString()
toString in class GridAbstractCommunicationClient
Follow @ApacheIgnite
Ignite Fabric : ver. 1.1.0-incubating Release Date : May 20 2015