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.
|
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.
|
GridNioFuture<?> |
pauseReads()
Pauses reads.
|
boolean |
readsPaused()
Checks whether reads are paused.
|
GridNioRecoveryDescriptor |
recoveryDescriptor() |
void |
recoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc) |
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.
|
@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.@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 recoveryDescriptor(GridNioRecoveryDescriptor recoveryDesc)
recoveryDesc - Recovery descriptor.@Nullable GridNioRecoveryDescriptor recoveryDescriptor()
null otherwise.
Follow @ApacheIgnite
Ignite Fabric : ver. 1.0.0-RC3 Release Date : March 24 2015