|
org.codehaus.gpars | |||||||
FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ThreadLocal groovyx.gpars.ThreadLocalPools
final class ThreadLocalPools extends java.lang.ThreadLocal
Holds a thread-local stack of pools to allow for nested calls to ForkJoinPool.withPool() or GParsExecutorsPool.withPool()
Constructor Summary | |
ThreadLocalPools()
|
Method Summary | |
---|---|
java.lang.Object
|
getCurrent()
Gives the current element |
protected java.util.LinkedList
|
initialValue()
|
void
|
leftShift(java.lang.Object pool)
Adds a new element |
void
|
pop()
Removes the top (last) element |
Methods inherited from class java.lang.ThreadLocal | |
---|---|
java.lang.ThreadLocal#get(), java.lang.ThreadLocal#remove(), java.lang.ThreadLocal#set(java.lang.Object), java.lang.ThreadLocal#wait(long), java.lang.ThreadLocal#wait(), java.lang.ThreadLocal#wait(long, int), java.lang.ThreadLocal#equals(java.lang.Object), java.lang.ThreadLocal#toString(), java.lang.ThreadLocal#hashCode(), java.lang.ThreadLocal#getClass(), java.lang.ThreadLocal#notify(), java.lang.ThreadLocal#notifyAll() |
Methods inherited from class java.lang.Object | |
---|---|
java.lang.Object#wait(long), java.lang.Object#wait(), java.lang.Object#wait(long, int), java.lang.Object#equals(java.lang.Object), java.lang.Object#toString(), java.lang.Object#hashCode(), java.lang.Object#getClass(), java.lang.Object#notify(), java.lang.Object#notifyAll() |
Constructor Detail |
---|
ThreadLocalPools()
Method Detail |
---|
java.lang.Object getCurrent()
@Override protected java.util.LinkedList initialValue()
@SuppressWarnings({"UnusedDeclaration"}) void leftShift(java.lang.Object pool)
pool
- The pool to store
void pop()
Copyright © 2008–2012 Václav Pech. All Rights Reserved.