|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
InstanceType - the type of the object that are managed by the pool
(could be EasyBeansSLSB, etc.)Clue - a clue to retrieve a specific instance in the poolpublic interface Pool<InstanceType,Clue>
Defines a common pool interface used to manage objects.
| Method Summary | |
|---|---|
void |
discard(InstanceType instance)
Discard the instance which is in the pool. |
InstanceType |
get()
Gets an object from the pool. |
InstanceType |
get(Clue clue)
Gets an object by using a specific hint. |
void |
release(InstanceType instance)
Puts back the instance in the pool so it can be reused. |
void |
setPoolConfiguration(IPoolConfiguration poolConfiguration)
Configure the pool with a given configuration. |
void |
start()
Start the pool. It could create initial instances if specified. |
void |
stop()
Stop this pool. |
| Method Detail |
|---|
void setPoolConfiguration(IPoolConfiguration poolConfiguration)
poolConfiguration - the given configuration
InstanceType get()
throws PoolException
PoolException - if instance cannot be returned.
InstanceType get(Clue clue)
throws PoolException
clue - attribute used to retrieve a given instance
PoolException - if instance cannot be returned.
void release(InstanceType instance)
throws PoolException
instance - which will be put back in the pool.
PoolException - if instance is not released.
void discard(InstanceType instance)
throws PoolException
instance - which will be discarded.
PoolException - if instance is not discarded.
void start()
throws PoolException
PoolException - if initialization fails
void stop()
throws PoolException
PoolException - if destroy fails
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||