|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cxf.common.util.factory.AbstractPool
public abstract class AbstractPool
A simple implementation of Pool that uses null to indicate non-existent pool entry.
This implementation synchronizes on getMutex() for thread safety.
| Constructor Summary | |
|---|---|
AbstractPool()
|
|
| Method Summary | |
|---|---|
abstract java.lang.Object |
get()
Get the pooled instance. |
java.lang.Object |
getInstance(Factory factory)
Apply the pooling strategy and return an instance from either the pool or the factory. |
protected abstract java.lang.Object |
getMutex()
Get the object that can be used to synchronize. |
java.lang.Object |
getPooledInstance(java.lang.Object def)
Get the instance that's already pooled. |
protected static java.lang.Object |
ifnull(java.lang.Object obj,
java.lang.Object def)
|
boolean |
isPooled()
Is this pool currently having something in cache? |
abstract void |
set(java.lang.Object val)
set an value to the pool. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractPool()
| Method Detail |
|---|
public java.lang.Object getInstance(Factory factory)
throws java.lang.Throwable
Pool
getInstance in interface Poolfactory - the factory to create the object instance.
java.lang.Throwablepublic java.lang.Object getPooledInstance(java.lang.Object def)
Pool
getPooledInstance in interface Pooldef - the default value to return if there's no pooled instance.
public boolean isPooled()
Pool
isPooled in interface Pool
protected static java.lang.Object ifnull(java.lang.Object obj,
java.lang.Object def)
public abstract java.lang.Object get()
public abstract void set(java.lang.Object val)
val - the value to be pooled.protected abstract java.lang.Object getMutex()
|
Apache CXF API | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||