public class GridShmemCommunicationClient extends GridAbstractCommunicationClient
metricsLsnr| Constructor and Description |
|---|
GridShmemCommunicationClient(GridNioMetricsListener metricsLsnr,
int port,
long connTimeout,
GridLogger log,
GridNioMessageWriter msgWriter) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
close() |
void |
doHandshake(GridInClosure2X<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) |
void |
sendMessage(UUID nodeId,
GridTcpCommunicationMessageAdapter msg) |
String |
toString() |
async, closed, getIdleTime, markUsed, release, reserve, reservedpublic GridShmemCommunicationClient(GridNioMetricsListener metricsLsnr, int port, long connTimeout, GridLogger log, GridNioMessageWriter msgWriter) throws GridException
metricsLsnr - Metrics listener.port - Shared memory IPC server port.connTimeout - Connection timeout.log - Logger.msgWriter - Message writer.GridException - If failed.public void doHandshake(GridInClosure2X<InputStream,OutputStream> handshakeC) throws GridException
handshakeC - Handshake.GridException - 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 GridException
data - Data to send.len - Length.GridException - If failed.public void sendMessage(@Nullable UUID nodeId, GridTcpCommunicationMessageAdapter msg) throws GridException
nodeId - Node ID (provided only if versions of local and remote nodes are different).msg - Message to send.GridException - If failed.public void sendMessage(ByteBuffer data) throws GridException
data - Data to send.GridException - If failed.public void flushIfNeeded(long timeout)
throws IOException
timeout - Timeout.IOException - If failed.public String toString()
toString in class GridAbstractCommunicationClientCopyright © 2014. All rights reserved.