Class SelectorManager
java.lang.Object
org.apache.activemq.transport.nio.SelectorManager
The SelectorManager will manage one Selector and the thread that checks the
selector.
We may need to consider running more than one thread to check the selector if
servicing the selector takes too long.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected ExecutorService
static SelectorManager
int
void
onWorkerEmptyEvent
(SelectorWorker worker) void
onWorkerNotFullEvent
(SelectorWorker worker) register
(AbstractSelectableChannel selectableChannel, SelectorManager.Listener listener) void
setChannelExecutor
(Executor channelExecutor) void
setMaxChannelsPerWorker
(int maxChannelsPerWorker) void
setSelectorExecutor
(Executor selectorExecutor)
-
Field Details
-
SINGLETON
-
-
Constructor Details
-
SelectorManager
public SelectorManager()
-
-
Method Details
-
createDefaultExecutor
-
getInstance
-
register
public SelectorSelection register(AbstractSelectableChannel selectableChannel, SelectorManager.Listener listener) throws IOException - Throws:
IOException
-
onWorkerEmptyEvent
-
onWorkerNotFullEvent
-
getChannelExecutor
-
setChannelExecutor
-
getMaxChannelsPerWorker
public int getMaxChannelsPerWorker() -
setMaxChannelsPerWorker
public void setMaxChannelsPerWorker(int maxChannelsPerWorker) -
getSelectorExecutor
-
setSelectorExecutor
-