|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openejb.cache.SimpleInstancePool
Constructor Summary | |
SimpleInstancePool(InstanceFactory factory,
int maxSize,
boolean hardLimit)
|
Method Summary | |
Object |
acquire()
Get an instance from the pool. |
void |
fill()
|
int |
getAllocatedSize()
Gets the number of allocated instances. |
int |
getMaxSize()
Get the maximum size of the pool. |
int |
getSize()
Return the size of the pool. |
boolean |
isHardLimit()
Determines if this pool has a hard limit. |
boolean |
release(Object instance)
Releases the hold on the instance. |
void |
remove(Object instance)
Drop an instance permanently from the pool. |
void |
startPooling()
|
List |
stopPooling()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SimpleInstancePool(InstanceFactory factory, int maxSize, boolean hardLimit)
Method Detail |
public void fill() throws Exception
Exception
public Object acquire() throws Exception
InstancePool
acquire
in interface InstancePool
Exception
- if object demand object construction was required and
an error occured during constructionpublic boolean release(Object instance)
InstancePool
release
in interface InstancePool
instance
- the instance to return to the pool
public void remove(Object instance)
InstancePool
remove
in interface InstancePool
instance
- the instance to discardpublic List stopPooling()
public void startPooling()
public int getSize()
public int getAllocatedSize()
public int getMaxSize()
public boolean isHardLimit()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |