|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The interface Pool defines an object that pools resources of any kind. Resources must be requested (getResource) and released (releaseResource) on demand. A Pool object can be parameterized along different dimensions. All these dimensions are represented by PoolAttributes interface.
Method Summary | |
int |
getFreeResourceNumber()
|
java.lang.Object |
getResource(java.lang.Object hints)
getResource is used to allocate a PoolResource from the Pool. |
java.lang.Object |
getResource(java.lang.Object hints,
java.lang.Object user)
getResource is used to allocate a PoolResource from the Pool. |
int |
getSize()
|
int |
getUsedResourceNumber()
|
java.util.Collection |
getUsers()
|
void |
releaseResource(java.lang.Object resource)
releaseResource releases a PoolResource in order to allow the Pool to recycle this PoolResource. |
Method Detail |
public java.lang.Object getResource(java.lang.Object hints) throws PoolException
hints
- Some properties to specialise the matching or the creation
of PoolResource.
PoolException
public java.lang.Object getResource(java.lang.Object hints, java.lang.Object user) throws PoolException, DeadLockException
hints
- Some properties to specialise the matching or the creation
of PoolResource.user
- is an identifier of the context wanting a resource in the
pool.
PoolException
DeadLockException
public void releaseResource(java.lang.Object resource) throws PoolException
resource
- The PoolResource to be released.
PoolException
public int getSize()
public int getFreeResourceNumber()
public int getUsedResourceNumber()
public java.util.Collection getUsers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |