|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.util.TimerTask
org.deegree_impl.tools.ObjectPool
class to manage the object pool. this is part of the combination of the object pool pattern an the singelton pattern.
----------------------------------------------------------
Field Summary | |
protected java.util.List |
available
|
protected int |
existingInstances
|
protected java.util.List |
in_use
|
private int |
maxInstances
|
private int |
maxLifeTime
|
private int |
maxUsageTime
|
protected java.util.Map |
startLifeTime
|
protected java.util.Map |
startUsageTime
|
private int |
updateInterval
|
Fields inherited from class java.util.TimerTask |
|
Constructor Summary | |
protected |
ObjectPool()
Creates a new ObjectPool object. |
Method Summary | |
private void |
cleaner()
|
void |
clear()
clears the complete pool. objects in used while the clear() method has been called won't be put back to the pool if released back through the releaseObject method. |
static ObjectPool |
getInstance()
dummy |
int |
getMaxInstances()
|
int |
getMaxLifeTime()
|
int |
getMaxUsageTime()
|
int |
getUpdateInterval()
|
abstract void |
onObjectKill(java.lang.Object o)
this method will be called when the submitted object will be removed from the pool |
void |
releaseObject(java.lang.Object object)
release an object back to the pool so it is available from other requests. |
void |
run()
|
void |
setMaxInstances(int maxInstances)
|
void |
setMaxLifeTime(int maxLifeTime)
|
void |
setMaxUsageTime(int maxUsageTime)
|
void |
setUpdateInterval(int updateInterval)
|
java.lang.String |
toString()
|
private void |
usage()
|
Methods inherited from class java.util.TimerTask |
cancel, scheduledExecutionTime |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.util.List available
protected java.util.List in_use
protected java.util.Map startLifeTime
protected java.util.Map startUsageTime
protected int existingInstances
private int maxInstances
private int maxLifeTime
private int maxUsageTime
private int updateInterval
Constructor Detail |
protected ObjectPool()
Method Detail |
public static ObjectPool getInstance()
public void clear()
public void releaseObject(java.lang.Object object) throws java.lang.Exception
java.lang.Exception
public abstract void onObjectKill(java.lang.Object o)
public int getMaxLifeTime()
public void setMaxLifeTime(int maxLifeTime)
maxLifeTime
- public int getMaxUsageTime()
public void setMaxUsageTime(int maxUsageTime)
maxUsageTime
- public int getUpdateInterval()
public void setUpdateInterval(int updateInterval)
updateInterval
- public int getMaxInstances()
public void setMaxInstances(int maxInstances)
maxInstances
- public java.lang.String toString()
public void run()
private void cleaner()
private void usage()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |