public abstract class BasePoolableObjectFactory<T> extends java.lang.Object implements PoolableObjectFactory<T>
| 构造器和说明 |
|---|
BasePoolableObjectFactory() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
activateObject(T obj)
No-op.
|
void |
destroyObject(T obj)
No-op.
|
abstract T |
makeObject()
Creates an instance that can be served by the pool.
|
void |
passivateObject(T obj)
No-op.
|
boolean |
validateObject(T obj)
This implementation always returns true.
|
public abstract T makeObject() throws java.lang.Exception
activated. They will not be
activated before being served by the pool.makeObject 在接口中 PoolableObjectFactory<T>java.lang.Exception - if there is a problem creating a new instance,
this will be propagated to the code requesting an object.public void destroyObject(T obj) throws java.lang.Exception
destroyObject 在接口中 PoolableObjectFactory<T>obj - ignoredjava.lang.Exception - should be avoided as it may be swallowed by
the pool implementation.PoolableObjectFactory.validateObject(T),
ObjectPool.invalidateObject(T)public boolean validateObject(T obj)
validateObject 在接口中 PoolableObjectFactory<T>obj - ignoredpublic void activateObject(T obj) throws java.lang.Exception
activateObject 在接口中 PoolableObjectFactory<T>obj - ignoredjava.lang.Exception - if there is a problem activating obj,
this exception may be swallowed by the pool.PoolableObjectFactory.destroyObject(T)public void passivateObject(T obj) throws java.lang.Exception
passivateObject 在接口中 PoolableObjectFactory<T>obj - ignoredjava.lang.Exception - if there is a problem passivating obj,
this exception may be swallowed by the pool.PoolableObjectFactory.destroyObject(T)