Class Pool.MonoEntry

java.lang.Object
Pool<T>.Entry
org.eclipse.jetty.util.Pool.MonoEntry
Enclosing class:
Pool<T>

private class Pool.MonoEntry extends Pool<T>.Entry

A Pool entry that holds metadata and a pooled object, that can only be acquired concurrently at most once, and can be acquired/released multiple times.

  • Field Details

  • Constructor Details

    • MonoEntry

      private MonoEntry()
  • Method Details

    • tryEnable

      protected boolean tryEnable(boolean acquire)
      Description copied from class: Pool.Entry

      Tries to enable, and possible also acquire, this Entry.

      Specified by:
      tryEnable in class Pool<T>.Entry
      Parameters:
      acquire - whether to also acquire this Entry
      Returns:
      whether this Entry was enabled
    • tryAcquire

      boolean tryAcquire()
      Description copied from class: Pool.Entry

      Tries to acquire this Entry.

      Specified by:
      tryAcquire in class Pool<T>.Entry
      Returns:
      whether this Entry was acquired
    • tryRelease

      boolean tryRelease()
      Description copied from class: Pool.Entry

      Tries to release this Entry.

      Specified by:
      tryRelease in class Pool<T>.Entry
      Returns:
      true if this Entry was released, false if Pool.Entry.tryRemove() should be called.
    • tryRemove

      boolean tryRemove()
      Description copied from class: Pool.Entry

      Tries to remove the entry by marking it as closed.

      Specified by:
      tryRemove in class Pool<T>.Entry
      Returns:
      whether the entry can be removed from the containing pool
    • isClosed

      public boolean isClosed()
      Specified by:
      isClosed in class Pool<T>.Entry
      Returns:
      whether this Entry is closed
    • isReserved

      public boolean isReserved()
      Specified by:
      isReserved in class Pool<T>.Entry
      Returns:
      whether this Entry is reserved
    • isIdle

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

      public boolean isInUse()
      Specified by:
      isInUse in class Pool<T>.Entry
      Returns:
      whether this entry is in use.
    • toString

      public String toString()
      Overrides:
      toString in class Object