|
||||||||||
| 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 an EJB, JDBC connection, etc.)Clue - a clue which is given to match an instance in the poolpublic interface PoolFactory<InstanceType,Clue>
Allows to call specific methods for each implementation of the pool for each lifecycle on an object.
| Method Summary | |
|---|---|
InstanceType |
create(Clue clue)
Creates an instance with the given hint. |
boolean |
isMatching(InstanceType instance,
Clue clue)
Checks if the given object with the given clue is matching. |
void |
remove(InstanceType instance)
Callback called when object is gonna be removed. |
boolean |
validate(InstanceType instance,
PoolEntryStatistics stats)
Validate an instance by giving some statistics. |
| Method Detail |
|---|
InstanceType create(Clue clue)
throws org.ow2.util.pool.api.PoolException
clue - a clue given by the Pool. Could be null.
org.ow2.util.pool.api.PoolException - if instance cannot be created.
boolean isMatching(InstanceType instance,
Clue clue)
instance - given object against which the check should be done.clue - the object used as clue to check the matching.
void remove(InstanceType instance)
instance - that is being removed from the pool.
boolean validate(InstanceType instance,
PoolEntryStatistics stats)
instance - the instance to validatestats - some statistics to help in the validating process.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||