|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Thread
org.glassfish.grizzly.threadpool.DefaultWorkerThread
public class DefaultWorkerThread
Default Grizzly worker thread implementation
| 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 |
| Fields inherited from interface org.glassfish.grizzly.threadpool.WorkerThread |
|---|
UNLIMITED_TRANSACTION_TIMEOUT |
| Constructor Summary | |
|---|---|
DefaultWorkerThread(AttributeBuilder attrBuilder,
java.lang.String name,
ThreadLocalPool pool,
java.lang.Runnable runTask)
|
|
| Method Summary | ||
|---|---|---|
AttributeHolder |
getAttributes()
Get associated AttributeHolder. |
|
|
getFromCache(ThreadCache.CachedTypeIndex<E> index)
Get the cached object with the given type index from cache. |
|
ThreadLocalPool |
getMemoryPool()
|
|
java.lang.Thread |
getThread()
|
|
long |
getTransactionTimeout(java.util.concurrent.TimeUnit timeunit)
|
|
boolean |
isSelectorThread()
|
|
|
putToCache(ThreadCache.CachedTypeIndex<E> index,
E o)
|
|
void |
setSelectorThread(boolean isSelectorThread)
|
|
void |
setTransactionTimeout(long timeout,
java.util.concurrent.TimeUnit timeunit)
|
|
|
takeFromCache(ThreadCache.CachedTypeIndex<E> index)
Take the cached object with the given type index from cache. |
|
| Methods inherited from class java.lang.Thread |
|---|
activeCount, checkAccess, clone, 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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.glassfish.grizzly.threadpool.WorkerThread |
|---|
destroy, getName, start, stop |
| Methods inherited from interface java.lang.Runnable |
|---|
run |
| Constructor Detail |
|---|
public DefaultWorkerThread(AttributeBuilder attrBuilder,
java.lang.String name,
ThreadLocalPool pool,
java.lang.Runnable runTask)
| Method Detail |
|---|
public java.lang.Thread getThread()
getThread in interface WorkerThreadpublic AttributeHolder getAttributes()
AttributeStorageAttributeHolder.
Implementation may return null if AttributeHolder wasn't
initialized yet.
getAttributes in interface AttributeStorageAttributeHolder.
Implementation may return null if AttributeHolder wasn't
initialized yet.public ThreadLocalPool getMemoryPool()
public final <E> E getFromCache(ThreadCache.CachedTypeIndex<E> index)
takeFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object won't be removed from cache.
E - index - the cached object type index.
public final <E> E takeFromCache(ThreadCache.CachedTypeIndex<E> index)
getFromCache(org.glassfish.grizzly.ThreadCache.CachedTypeIndex), the
object will be removed from cache.
E - index - the cached object type index.
public final <E> boolean putToCache(ThreadCache.CachedTypeIndex<E> index,
E o)
public long getTransactionTimeout(java.util.concurrent.TimeUnit timeunit)
getTransactionTimeout in interface WorkerThread
public void setTransactionTimeout(long timeout,
java.util.concurrent.TimeUnit timeunit)
setTransactionTimeout in interface WorkerThreadpublic boolean isSelectorThread()
isSelectorThread in interface WorkerThreadpublic void setSelectorThread(boolean isSelectorThread)
setSelectorThread in interface WorkerThread
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||