|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.Thread
org.apache.cassandra.net.SelectorManager
public class SelectorManager
Nested Class Summary |
---|
Nested classes/interfaces inherited from class java.lang.Thread |
---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
Field Summary | |
---|---|
protected java.nio.channels.Selector |
selector
|
Fields inherited from class java.lang.Thread |
---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
Method Summary | |
---|---|
protected void |
doProcess()
|
static SelectorManager |
getSelectorManager()
Returns the SelectorManager applications should use. |
static SelectorManager |
getUdpSelectorManager()
|
java.nio.channels.SelectionKey |
register(java.nio.channels.SelectableChannel channel,
SelectionKeyHandler handler,
int ops)
Registers a new channel with the selector, and attaches the given SelectionKeyHandler as the handler for the newly created key. |
void |
run()
This method starts the socket manager listening for events. |
Methods inherited from class java.lang.Thread |
---|
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected java.nio.channels.Selector selector
Method Detail |
---|
public java.nio.channels.SelectionKey register(java.nio.channels.SelectableChannel channel, SelectionKeyHandler handler, int ops) throws java.io.IOException
channel
- The channel to register with the selectorhandler
- The handler to use for the callbacksops
- The initial interest operations
java.io.IOException
- if the channel is closedpublic void run()
run
in interface java.lang.Runnable
run
in class java.lang.Thread
protected void doProcess() throws java.io.IOException
java.io.IOException
public static SelectorManager getSelectorManager()
public static SelectorManager getUdpSelectorManager()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |