Interface Pool<T>

    • Method Detail

      • take

        T take()
        Take an object from the object-pool.
        Returns:
        A free and usable object from the pool if one exists. Otherwise a new object is created from the underlying manager.
      • recycle

        void recycle​(T value)
        Recycles an object which might be reused. The caller must not use this object after calling this method.
        Parameters:
        value - The object to be recycled.
      • getPoolStats

        PoolStats getPoolStats()
        Returns:
        This pool's statistics object. Calls to this pool's methods are visible to successive calls to this statics-object's methods.
      • getNumPooled

        int getNumPooled()
        Returns:
        The number of currently pooled objects.
      • clear

        void clear()
        instructs the pool to destroy all pooled objects.