Class BaseObjectPool<T>

java.lang.Object
org.datanucleus.store.rdbms.datasource.dbcp2.pool2.BaseObject
org.datanucleus.store.rdbms.datasource.dbcp2.pool2.BaseObjectPool<T>
Type Parameters:
T - Type of element pooled in this pool.
All Implemented Interfaces:
Closeable, AutoCloseable, ObjectPool<T>
Direct Known Subclasses:
SoftReferenceObjectPool

public abstract class BaseObjectPool<T> extends BaseObject implements ObjectPool<T>
A simple base implementation of ObjectPool. Optional operations are implemented to either do nothing, return a value indicating it is unsupported or throw UnsupportedOperationException.

This class is intended to be thread-safe.

Since:
2.0
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Not supported in this base implementation.
    protected final void
    Throws an IllegalStateException when this pool has been closed.
    abstract T
    Obtains an instance from this pool.
    void
    Not supported in this base implementation.
    void
    Closes this pool, and free any resources associated with it.
    int
    Not supported in this base implementation.
    int
    Not supported in this base implementation.
    abstract void
    Invalidates an object from the pool.
    final boolean
    Has this pool instance been closed.
    abstract void
    Returns an instance to the pool.
    protected void
    Used by sub-classes to include the fields defined by the sub-class in the BaseObject.toString() output.

    Methods inherited from class org.datanucleus.store.rdbms.datasource.dbcp2.pool2.BaseObject

    toString

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.datanucleus.store.rdbms.datasource.dbcp2.pool2.ObjectPool

    addObjects