org.apache.activemq.transport.nio
Class SelectorManager
java.lang.Object
org.apache.activemq.transport.nio.SelectorManager
public final class SelectorManager
- extends java.lang.Object
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.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SINGLETON
public static final SelectorManager SINGLETON
SelectorManager
public SelectorManager()
createDefaultExecutor
protected java.util.concurrent.ExecutorService createDefaultExecutor()
getInstance
public static SelectorManager getInstance()
register
public SelectorSelection register(java.nio.channels.SocketChannel socketChannel,
SelectorManager.Listener listener)
throws java.io.IOException
- Throws:
java.io.IOException
onWorkerEmptyEvent
public void onWorkerEmptyEvent(SelectorWorker worker)
onWorkerNotFullEvent
public void onWorkerNotFullEvent(SelectorWorker worker)
getChannelExecutor
public java.util.concurrent.Executor getChannelExecutor()
setChannelExecutor
public void setChannelExecutor(java.util.concurrent.Executor channelExecutor)
getMaxChannelsPerWorker
public int getMaxChannelsPerWorker()
setMaxChannelsPerWorker
public void setMaxChannelsPerWorker(int maxChannelsPerWorker)
getSelectorExecutor
public java.util.concurrent.Executor getSelectorExecutor()
setSelectorExecutor
public void setSelectorExecutor(java.util.concurrent.Executor selectorExecutor)
Copyright © 2005-2012. All Rights Reserved.