|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjfun.yan.factory.ThreadLocalScope<T>
public class ThreadLocalScope<T>
Represents a pooling strategy that pools the data into a ThreadLocal object.
Zephyr Business Solution
| Constructor Summary | |
|---|---|
ThreadLocalScope()
|
|
| Method Summary | |
|---|---|
T |
getInstance(Factory<T> factory)
Apply the pooling strategy and return an instance from either the pool or the factory. |
T |
getPooledInstance(T def)
Get the instance that's already pooled. |
boolean |
isPooled()
Is this pool currently having something in cache? |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadLocalScope()
| Method Detail |
|---|
public T getInstance(Factory<T> factory)
Pool
getInstance in interface Pool<T>factory - the factory to create the object instance.
public T getPooledInstance(T def)
Pool
getPooledInstance in interface Pool<T>def - the default value to return if there's no pooled instance.
public boolean isPooled()
Pool
isPooled in interface Pool<T>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||