Interface LocalPool.Entry<B>

Enclosing class:
LocalPool<B>

public static sealed interface LocalPool.Entry<B>
Entry within a LocalPool.
  • Method Summary

    Modifier and Type
    Method
    Description
    get()
    Return the pooled object, which is locked exclusively.
    void
    Release the entry such that another thread can use the pooled object.
    void
    replace(B instance)
    Replace the pooled object.
  • Method Details

    • get

      B get()
      Return the pooled object, which is locked exclusively.
    • replace

      void replace(B instance)
      Replace the pooled object. This should only be called while the entry is locked exclusively.
    • release

      void release()
      Release the entry such that another thread can use the pooled object.