Class BaseGenericObjectPool.IdentityWrapper<T>

  • Type Parameters:
    T - type of objects in the pool
    Enclosing class:
    BaseGenericObjectPool<T>

    static class BaseGenericObjectPool.IdentityWrapper<T>
    extends Object
    Wrapper for objects under management by the pool. GenericObjectPool and GenericKeyedObjectPool maintain references to all objects under management using maps keyed on the objects. This wrapper class ensures that objects can work as hash keys.
    • Constructor Detail

      • IdentityWrapper

        public IdentityWrapper​(T instance)
        Constructs a wrapper for an instance.
        Parameters:
        instance - object to wrap
    • Method Detail

      • getObject

        public T getObject()
        Returns:
        the wrapped object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object