Class Pool.Entry.Wrapper<W>

java.lang.Object
org.eclipse.jetty.util.Pool.Entry.Wrapper<W>
Type Parameters:
W - the type of the pooled objects
All Implemented Interfaces:
Pool.Entry<W>
Enclosing interface:
Pool.Entry<E>

public static class Pool.Entry.Wrapper<W> extends Object implements Pool.Entry<W>

A wrapper for Entry instances.

  • Constructor Details

  • Method Details

    • getWrapped

      public Pool.Entry<W> getWrapped()
    • enable

      public boolean enable(W pooled, boolean acquire)
      Description copied from interface: Pool.Entry

      Enables this, previously reserved, Entry.

      An entry returned from the Pool.reserve() method must be enabled with this method, once and only once, before it is usable by the pool.

      The entry may be enabled and not acquired, in which case it is immediately available to be acquired, potentially by another thread; or it can be enabled and acquired atomically so that no other thread can acquire it, although the acquire may still fail if the pool has been terminated.

      Specified by:
      enable in interface Pool.Entry<W>
      Parameters:
      pooled - the pooled object for this Entry
      acquire - whether this Entry should be atomically enabled and acquired
      Returns:
      whether this Entry was enabled
    • getPooled

      public W getPooled()
      Specified by:
      getPooled in interface Pool.Entry<W>
      Returns:
      the pooled object
    • release

      public boolean release()
      Description copied from interface: Pool.Entry

      Releases this Entry to the Pool.

      Specified by:
      release in interface Pool.Entry<W>
      Returns:
      whether this Entry was released
    • remove

      public boolean remove()
      Description copied from interface: Pool.Entry

      Removes this Entry from the Pool.

      Specified by:
      remove in interface Pool.Entry<W>
      Returns:
      whether this Entry was removed
    • isReserved

      public boolean isReserved()
      Specified by:
      isReserved in interface Pool.Entry<W>
      Returns:
      whether this Entry is reserved
      See Also:
    • isIdle

      public boolean isIdle()
      Specified by:
      isIdle in interface Pool.Entry<W>
      Returns:
      whether this Entry is idle in the Pool
    • isInUse

      public boolean isInUse()
      Specified by:
      isInUse in interface Pool.Entry<W>
      Returns:
      whether this Entry is in use
    • isTerminated

      public boolean isTerminated()
      Specified by:
      isTerminated in interface Pool.Entry<W>
      Returns:
      whether this Entry is terminated