KeyedPooledObjectFactory.
All operations defined here are essentially no-op's.
This class is immutable, and therefore thread-safe.
KeyedPooledObjectFactory
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public void | activateObject(final K
the key used when selecting the object key, final PooledObject<V> a p)PooledObject wrapping the instance to be activatedImplements org. Reinitializes an instance to be returned by the pool. |
| public abstract V | Returns: an instance that can be served by the poolthe key used when constructing the object key)Creates an instance that can be served by the pool. |
| public void | destroyObject(final K
the key used when selecting the instance key, final PooledObject<V> a p)PooledObject wrapping the instance to be destroyedImplements org. Destroys an instance no longer needed by the pool. |
| public PooledObject | makeObject(final K key)
Implements org. Creates an instance that can be served by the pool and
wrap it in a |
| public void | passivateObject(final K
the key used when selecting the object key, final PooledObject<V> a p)PooledObject wrapping the instance to be passivatedImplements org. Uninitializes an instance to be returned to the idle object pool. |
| public boolean | Returns: alwaystrue in this default implementationthe key used when selecting the object key, final PooledObject<V> a p)PooledObject wrapping the instance to be validatedImplements org. Ensures that the instance is safe to be returned by the pool. |
| public abstract PooledObject | Returns: The provided instance, wrapped by aPooledObjectthe instance to wrap, should not be null. value)Wraps the provided instance with an implementation of
|
| BaseKeyedPooledObjectFactory | back to summary |
|---|---|
| public BaseKeyedPooledObjectFactory() Constructs a new instance. | |
| activateObject | back to summary |
|---|---|
| public void activateObject(final K key, final PooledObject<V> p) throws Exception Implements org. Reinitializes an instance to be returned by the pool. The default implementation is a no-op.
| |
| create | back to summary |
|---|---|
| public abstract V create(K key) throws Exception Creates an instance that can be served by the pool.
| |
| destroyObject | back to summary |
|---|---|
| public void destroyObject(final K key, final PooledObject<V> p) throws Exception Implements org. Destroys an instance no longer needed by the pool. The default implementation is a no-op.
| |
| makeObject | back to summary |
|---|---|
| public PooledObject Implements org. Doc from org. Creates an instance that can be served by the pool and
wrap it in a | |
| passivateObject | back to summary |
|---|---|
| public void passivateObject(final K key, final PooledObject<V> p) throws Exception Implements org. Uninitializes an instance to be returned to the idle object pool. The default implementation is a no-op.
| |
| validateObject | back to summary |
|---|---|
| public boolean validateObject(final K key, final PooledObject<V> p) Implements org. Ensures that the instance is safe to be returned by the pool.
The default implementation always returns
| |
| wrap | back to summary |
|---|---|
| public abstract PooledObject Wraps the provided instance with an implementation of
| |