public class HadoopIgfsIpcIo extends Object implements HadoopIgfsIo
| Constructor and Description |
|---|
HadoopIgfsIpcIo(String endpointAddr,
IgfsMarshaller marsh,
org.apache.commons.logging.Log log) |
| Modifier and Type | Method and Description |
|---|---|
void |
addEventListener(HadoopIgfsIpcIoListener lsnr)
Adds event listener that will be invoked when connection with server is lost or remote error has occurred.
|
void |
forceClose()
Closes this IO instance, removing it from cache.
|
static HadoopIgfsIpcIo |
get(org.apache.commons.logging.Log log,
String endpoint)
Returns a started and valid instance of this class
for a given endpoint.
|
void |
release()
Releases this instance, decrementing usage count.
|
void |
removeEventListener(HadoopIgfsIpcIoListener lsnr)
Removes event listener that will be invoked when connection with server is lost or remote error has occurred.
|
IgniteInternalFuture<IgfsMessage> |
send(IgfsMessage msg)
Sends given IGFS client message and asynchronously awaits for response.
|
<T> IgniteInternalFuture<T> |
send(IgfsMessage msg,
byte[] outBuf,
int outOff,
int outLen)
Sends given IGFS client message and asynchronously awaits for response.
|
void |
sendPlain(IgfsMessage msg)
Sends given message and does not wait for response.
|
String |
toString() |
public HadoopIgfsIpcIo(String endpointAddr, IgfsMarshaller marsh, org.apache.commons.logging.Log log)
endpointAddr - Endpoint.marsh - Protocol.log - Logger to use.public static HadoopIgfsIpcIo get(org.apache.commons.logging.Log log, String endpoint) throws IOException
log - Logger to use for new instance.endpoint - Endpoint string.IOException - If new instance was created but failed to start.public void release()
If usage count becomes zero, the instance is stopped and removed from cache.
public void forceClose()
public void addEventListener(HadoopIgfsIpcIoListener lsnr)
addEventListener in interface HadoopIgfsIolsnr - Event listener.public void removeEventListener(HadoopIgfsIpcIoListener lsnr)
removeEventListener in interface HadoopIgfsIolsnr - Event listener.public IgniteInternalFuture<IgfsMessage> send(IgfsMessage msg) throws IgniteCheckedException
send in interface HadoopIgfsIomsg - Message to send.IgniteCheckedException - If a message cannot be sent (connection is broken or client was closed).public <T> IgniteInternalFuture<T> send(IgfsMessage msg, @Nullable byte[] outBuf, int outOff, int outLen) throws IgniteCheckedException
send in interface HadoopIgfsIomsg - Message to send.outBuf - Output buffer. If null, the output buffer is not used.outOff - Output buffer offset.outLen - Output buffer length.IgniteCheckedException - If a message cannot be sent (connection is broken or client was closed).public void sendPlain(IgfsMessage msg) throws IgniteCheckedException
sendPlain in interface HadoopIgfsIomsg - Message to send.IgniteCheckedException - If send failed.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.5.1-p166 Release Date : September 3 2019