|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
com.maverick.nio.SelectorThread
public class SelectorThread
Provides management of a single selector.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
SelectorThread(SelectorThreadPool pool,
SelectorThreadImpl impl,
boolean isPermanent,
int maximumNumOfChannels,
int id,
int idleServicePeriod,
int inactivePeriodsPerIdleEvent,
java.nio.channels.spi.SelectorProvider selectorProvider)
Construct a new selector thread. |
|
| Method Summary | |
|---|---|
void |
addSelectorOperation(java.lang.Runnable r)
Add an operation to the selector. |
int |
getMaximumLoad()
Get the maximum number of channels that this thread can service. |
int |
getSelectorId()
Get the id of this selector thread. |
int |
getThreadLoad()
Get the current thread load. |
boolean |
isPermanent()
Is this a permanent thread? |
boolean |
register(java.nio.channels.SelectableChannel sc,
int ops,
java.lang.Object attachment,
boolean wakeUp)
Register a channel with the selector. |
void |
run()
The threads main. |
void |
shutdown()
Shutdown the thread. |
void |
wakeup()
Wakeup the selector. |
| 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 |
| Constructor Detail |
|---|
public SelectorThread(SelectorThreadPool pool,
SelectorThreadImpl impl,
boolean isPermanent,
int maximumNumOfChannels,
int id,
int idleServicePeriod,
int inactivePeriodsPerIdleEvent,
java.nio.channels.spi.SelectorProvider selectorProvider)
throws java.io.IOException
pool - SelectorThreadPoolimpl - SelectorThreadImplisPermanent - booleanmaximumNumOfChannels - intid - intidleServicePeriod - intinactivePeriodsPerIdleEvent - intselectorProvider - SelectorProvider
java.io.IOException| Method Detail |
|---|
public boolean register(java.nio.channels.SelectableChannel sc,
int ops,
java.lang.Object attachment,
boolean wakeUp)
throws java.nio.channels.ClosedChannelException
sc - SelectableChannelops - intattachment - ObjectwakeUp - boolean
java.nio.channels.ClosedChannelExceptionpublic void addSelectorOperation(java.lang.Runnable r)
r - Runnablepublic void wakeup()
public int getThreadLoad()
public boolean isPermanent()
public void shutdown()
public int getSelectorId()
public int getMaximumLoad()
public void run()
run in interface java.lang.Runnablerun in class java.lang.Thread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||