类 AbstractPoolingTargetSource

所有已实现的接口:
PoolingConfig, TargetClassAware, TargetSource, Aware, BeanFactoryAware, DisposableBean, Serializable
直接已知子类:
CommonsPool2TargetSource

public abstract class AbstractPoolingTargetSource extends AbstractPrototypeTargetSource implements PoolingConfig, DisposableBean
Abstract base class for pooling TargetSource implementations which maintain a pool of target instances, acquiring and releasing a target object from the pool for each method invocation. This abstract base class is independent of concrete pooling technology; see the subclass CommonsPool2TargetSource for a concrete example.

Subclasses must implement the getTarget() and releaseTarget(java.lang.Object) methods based on their chosen object pool. The AbstractPrototypeTargetSource.newPrototypeInstance() method inherited from AbstractPrototypeTargetSource can be used to create objects in order to put them into the pool.

Subclasses must also implement some of the monitoring methods from the PoolingConfig interface. The getPoolingConfigMixin() method makes these stats available on proxied objects through an IntroductionAdvisor.

This class implements the DisposableBean interface in order to force subclasses to implement a DisposableBean.destroy() method, closing down their object pool.

从以下版本开始:
4.0
作者:
Rod Johnson, Juergen Hoeller
另请参阅:
  • 构造器详细资料

    • AbstractPoolingTargetSource

      public AbstractPoolingTargetSource()
  • 方法详细资料