public interface GridNioSession
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepted() |
<T> T |
addMeta(int key,
T val)
Adds metadata associated with specified key.
|
long |
bytesReceived()
Gets the total count of bytes received since the session was created.
|
long |
bytesSent()
Gets the total count of bytes sent since the session was created.
|
GridNioFuture<Boolean> |
close()
Performs a request for asynchronous session close.
|
long |
closeTime()
If session is closed, this method will return session close time returned by
System.currentTimeMillis(). |
long |
createTime()
Gets the time when the session was created.
|
GridNioRecoveryDescriptor |
inRecoveryDescriptor() |
void |
inRecoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc) |
long |
lastReceiveTime()
Returns the time when last read activity was performed on this session.
|
long |
lastSendScheduleTime()
Returns time when last send was scheduled on this session.
|
long |
lastSendTime()
Returns time when last send activity was performed on this session.
|
InetSocketAddress |
localAddress()
Gets local address of this session.
|
<T> T |
meta(int key)
Gets metadata associated with specified key.
|
GridNioRecoveryDescriptor |
outRecoveryDescriptor() |
void |
outRecoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc) |
GridNioFuture<?> |
pauseReads()
Pauses reads.
|
boolean |
readsPaused()
Checks whether reads are paused.
|
InetSocketAddress |
remoteAddress()
Gets address of remote peer on this session.
|
<T> T |
removeMeta(int key)
Removes metadata with the specified key.
|
GridNioFuture<?> |
resumeReads()
Resumes session reads.
|
GridNioFuture<?> |
send(Object msg)
Performs a request for asynchronous data send.
|
void |
sendNoFuture(Object msg,
IgniteInClosure<IgniteException> ackC) |
void |
systemMessage(Object msg) |
@Nullable InetSocketAddress localAddress()
null if non-socket communication is used.@Nullable InetSocketAddress remoteAddress()
null if non-socket communication is used.long bytesSent()
long bytesReceived()
long createTime()
System.currentTimeMillis().long closeTime()
System.currentTimeMillis().
If session is not closed, this method will return 0.long lastReceiveTime()
long lastSendTime()
long lastSendScheduleTime()
GridNioFuture<Boolean> close()
GridNioFuture<?> send(Object msg)
msg - Message to be sent. This message will be eventually passed in to a parser plugged
to the nio server.void sendNoFuture(Object msg, @Nullable IgniteInClosure<IgniteException> ackC) throws IgniteCheckedException
msg - Message to be sent.ackC - Optional closure invoked when ack for message is received.IgniteCheckedException - If failed.@Nullable <T> T meta(int key)
key - Key to look up.null if meta was not found.@Nullable
<T> T addMeta(int key,
@Nullable
T val)
key - Metadata Key.val - Metadata value.null if no objects were associated.@Nullable <T> T removeMeta(int key)
key - Metadata key.null.boolean accepted()
True if this connection was initiated from remote node.GridNioFuture<?> resumeReads()
GridNioFuture<?> pauseReads()
boolean readsPaused()
True if reads are paused.void outRecoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc)
recoveryDesc - Recovery descriptor.void inRecoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc)
recoveryDesc - Recovery descriptor.@Nullable GridNioRecoveryDescriptor outRecoveryDescriptor()
null otherwise.@Nullable GridNioRecoveryDescriptor inRecoveryDescriptor()
null otherwise.void systemMessage(Object msg)
msg - System message to send.
Follow @ApacheIgnite
Ignite Fabric : ver. 2.0.0 Release Date : April 30 2017