public class GridShmemCommunicationClient extends GridAbstractCommunicationClient
| Modifier and Type | Field and Description |
|---|---|
protected @Nullable AtomicLongMetric |
sentBytesCntMetric
Sent bytes count metric.
|
| Constructor and Description |
|---|
GridShmemCommunicationClient(int connIdx,
MetricRegistry mreg,
int port,
long connTimeout,
IgniteLogger log,
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 |
forceClose()
Forces client close.
|
void |
sendMessage(byte[] data,
int len) |
void |
sendMessage(ByteBuffer data) |
boolean |
sendMessage(UUID nodeId,
Message msg,
IgniteInClosure<IgniteException> c) |
String |
toString() |
async, closed, connectionIndex, getIdleTime, markUsed, release, reserve@Nullable protected final @Nullable AtomicLongMetric sentBytesCntMetric
public GridShmemCommunicationClient(int connIdx,
MetricRegistry mreg,
int port,
long connTimeout,
IgniteLogger log,
MessageFormatter formatter)
throws IgniteCheckedException
connIdx - Connection index.mreg - Metrics registry.port - Shared memory IPC server port.connTimeout - Connection timeout.log - Logger.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(UUID nodeId, Message msg, IgniteInClosure<IgniteException> c) throws IgniteCheckedException
nodeId - Remote node ID. Provided only for sync clients.msg - Message to send.c - Ack closure.True if should try to resend message.IgniteCheckedException - 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 Database and Caching Platform : ver. 2.9.1 Release Date : December 9 2020