Package com.gigaspaces.lrmi.nio.selector
Class SelectorManager
java.lang.Object
com.j_spaces.kernel.ManagedRunnable
com.gigaspaces.lrmi.nio.selector.SelectorManager
Event queue for I/O events raised by a selector. This class receives the lower level events
raised by a Selector and dispatches them to the appropriate handler. The SelectorThread class
performs a similar task. In particular:
- Listens for connection requests, accepts them and creates new connections in the Pivot Channels
Table.
- Selects a set of channels available for read. If a channel is available for read, it creates a
bus packet with the channel info and dispatches it to a worker thread or handling.
- Since:
- 6.0.4, 6.5
- Author:
- Guy Korland
-
Constructor Summary
ConstructorsConstructorDescriptionSelectorManager(Pivot pivot, String hostName, String port, int readSelectorThreads) -
Method Summary
Modifier and TypeMethodDescriptionintgetPort()getReadHandler(SelectableChannel channel) getWriteHandler(SelectableChannel channel) protected voidThis method will be invoked by requestShutdown().Methods inherited from class com.j_spaces.kernel.ManagedRunnable
requestShutdown, shouldShutdown
-
Constructor Details
-
SelectorManager
public SelectorManager(Pivot pivot, String hostName, String port, int readSelectorThreads) throws IOException - Throws:
IOException
-
-
Method Details
-
waitWhileFinish
protected void waitWhileFinish()Description copied from class:ManagedRunnableThis method will be invoked by requestShutdown(). Request method will be block while waitWhileFinish() will not be finished.- Specified by:
waitWhileFinishin classManagedRunnable
-
getPort
public int getPort() -
getHostName
-
getBindInetSocketAddress
-
getReadHandler
-
getWriteHandler
-