public class DefaultWorkerThread extends Thread implements WorkerThread
Thread.State, Thread.UncaughtExceptionHandlerMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITYUNLIMITED_TRANSACTION_TIMEOUT| Constructor and Description |
|---|
DefaultWorkerThread(AttributeBuilder attrBuilder,
String name,
ThreadLocalPool pool,
Runnable runTask) |
| Modifier and Type | Method and Description |
|---|---|
AttributeHolder |
getAttributes()
Get associated
AttributeHolder. |
<E> E |
getFromCache(ThreadCache.CachedTypeIndex<E> index)
Get the cached object with the given type index from cache.
|
ThreadLocalPool |
getMemoryPool() |
Thread |
getThread() |
long |
getTransactionTimeout(TimeUnit timeunit) |
<E> boolean |
putToCache(ThreadCache.CachedTypeIndex<E> index,
E o) |
void |
setTransactionTimeout(long timeout,
TimeUnit timeunit) |
<E> E |
takeFromCache(ThreadCache.CachedTypeIndex<E> index)
Take the cached object with the given type index from cache.
|
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, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitdestroy, getName, start, stoppublic DefaultWorkerThread(AttributeBuilder attrBuilder, String name, ThreadLocalPool pool, Runnable runTask)
public 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(TimeUnit timeunit)
getTransactionTimeout in interface WorkerThreadpublic void setTransactionTimeout(long timeout,
TimeUnit timeunit)
setTransactionTimeout in interface WorkerThreadCopyright © 2017–2019 Oracle Corporation. All rights reserved.