|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.xfire.util.factory.CachingPool
org.codehaus.xfire.util.factory.SingletonPool
public class SingletonPool
Represents a pooling strategy that pools the data in a variable that's global
to all threads.
This implementation is thread-safe.
Constructor Summary | |
---|---|
SingletonPool()
|
Method Summary | |
---|---|
java.lang.Object |
getInstance(Factory factory)
Apply the pooling strategy and return an instance from either the pool or the factory. |
java.lang.Object |
getPooledInstance(java.lang.Object 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 SingletonPool()
Method Detail |
---|
public java.lang.Object getInstance(Factory factory) throws java.lang.Throwable
Pool
getInstance
in interface Pool
getInstance
in class CachingPool
factory
- the factory to create the object instance.
java.lang.Throwable
public java.lang.Object getPooledInstance(java.lang.Object def)
Pool
getPooledInstance
in interface Pool
getPooledInstance
in class CachingPool
def
- the default value to return if there's no pooled instance.
public boolean isPooled()
CachingPool
isPooled
in interface Pool
isPooled
in class CachingPool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |