org.codehaus.gpars

groovyx.gpars
[Java] Class ThreadLocalPools

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()

Authors:
Vaclav Pech Date: Dec 15, 2009


Constructor Summary
ThreadLocalPools()

 
Method Summary
java.lang.Object getCurrent()

Indicates whether the stack is empty

protected java.util.LinkedList initialValue()

java.lang.Object isEmpty()

void leftShift(java.lang.Object pool)

Removes the top (last) element

void pop()

 
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, int), java.lang.ThreadLocal#wait(long), java.lang.ThreadLocal#wait(), 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, int), java.lang.Object#wait(long), java.lang.Object#wait(), 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

ThreadLocalPools()


 
Method Detail

getCurrent

java.lang.Object getCurrent()
Indicates whether the stack is empty
Returns:
True if the stack is empty


initialValue

@java.lang.Override/**
protected java.util.LinkedList initialValue()


isEmpty

java.lang.Object isEmpty()


leftShift

@java.lang.SuppressWarnings*
void leftShift(java.lang.Object pool)
Removes the top (last) element


pop

void pop()


 

Copyright © 2008–2013 Václav Pech. All Rights Reserved.