Class WeakPool.Entry<B>

java.lang.Object
java.lang.ref.Reference<B>
java.lang.ref.WeakReference<B>
org.cojen.tupl.util.WeakPool.Entry<B>
Enclosing class:
WeakPool<B>

public static final class WeakPool.Entry<B> extends WeakReference<B>
An entry which weakly references a pooled object.
  • Method Details

    • release

      public void release()
      Release the entry such that it can be accessed again later. This method is thread-safe and doesn't need to be called from the thread that accessed the entry.
    • discard

      public void discard()
      Discard the entry from the pool instead of releasing it.