|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.codehaus.xfire.util.factory.CachingPool
public class CachingPool
A thread-unsafe implementation of Pool that does simple caching.
Constructor Summary | |
---|---|
CachingPool()
|
Method Summary | |
---|---|
Object |
getInstance(Factory factory)
Apply the pooling strategy and return an instance from either the pool or the factory. |
Object |
getPooledInstance(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 CachingPool()
Method Detail |
---|
public Object getInstance(Factory factory) throws Throwable
Pool
getInstance
in interface Pool
factory
- the factory to create the object instance.
Throwable
public Object getPooledInstance(Object def)
Pool
getPooledInstance
in interface Pool
def
- the default value to return if there's no pooled instance.
public boolean isPooled()
isPooled
in interface Pool
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |