Package com.gigaspaces.lrmi.nio.async
Class AsyncContext
java.lang.Object
com.gigaspaces.lrmi.nio.async.AsyncContext
- All Implemented Interfaces:
IWriteInterestManager,Context
a client handler context implementation. stores the state of the async operation. a normal
operation includes multiple write and read action.
first operation is always a write followed by a sequence of read(class requests) and writes
(class response). the last action is always a read of the final result.
at the end of the operation the associated connection (CPeer) is returned to the pool.
- Since:
- 6.5
- Author:
- asy ronen
-
Constructor Summary
ConstructorsConstructorDescriptionAsyncContext(ConnectionPool connPool, ClientHandler handler, RequestPacket packet, LRMIFuture result, CPeer cpeer, IRemoteClassProviderProvider remoteConnection, ClassLoader contextClassLoader, LRMIRemoteClassLoaderIdentifier remoteClassLoaderIdentifier, String monitoringId, ClientPeerWatchedObjectsContext watchedObjectContext) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Release the CPeer when called on un register from the SelectorvoidvoidvoidvoidvoidvoidremoveWriteInterest(boolean restoreReadInterest) voidvoid
-
Constructor Details
-
AsyncContext
public AsyncContext(ConnectionPool connPool, ClientHandler handler, RequestPacket packet, LRMIFuture result, CPeer cpeer, IRemoteClassProviderProvider remoteConnection, ClassLoader contextClassLoader, LRMIRemoteClassLoaderIdentifier remoteClassLoaderIdentifier, String monitoringId, ClientPeerWatchedObjectsContext watchedObjectContext)
-
-
Method Details
-
setSelectionKey
- Specified by:
setSelectionKeyin interfaceContext
-
getSelectionKey
- Specified by:
getSelectionKeyin interfaceContext
-
handleRead
public void handleRead()- Specified by:
handleReadin interfaceContext
-
handleWrite
public void handleWrite()- Specified by:
handleWritein interfaceContext
-
handleSetReadInterest
public void handleSetReadInterest()- Specified by:
handleSetReadInterestin interfaceContext
-
removeWriteInterest
public void removeWriteInterest(boolean restoreReadInterest) - Specified by:
removeWriteInterestin interfaceIWriteInterestManager
-
setWriteInterest
public void setWriteInterest()- Specified by:
setWriteInterestin interfaceIWriteInterestManager
-
close
-
closeAndDisconnect
public void closeAndDisconnect()- Specified by:
closeAndDisconnectin interfaceContext
-
close
public void close()Release the CPeer when called on un register from the Selector
-