Package org.eclipse.jetty.util
Class Pool.MonoEntry
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 Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isClosed()
boolean
isIdle()
boolean
isInUse()
boolean
toString()
(package private) boolean
Tries to acquire this Entry.protected boolean
tryEnable
(boolean acquire) Tries to enable, and possible also acquire, this Entry.(package private) boolean
Tries to release this Entry.(package private) boolean
Tries to remove the entry by marking it as closed.Methods inherited from class org.eclipse.jetty.util.Pool.Entry
enable, getPooled, getUsageCount, isIdleAndOverUsed, isOverUsed, release, remove, setUsageCount
-
Field Details
-
state
-
-
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.
-
tryAcquire
boolean tryAcquire()Description copied from class:Pool.Entry
Tries to acquire this Entry.
- Specified by:
tryAcquire
in classPool<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 classPool<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.
-
isClosed
public boolean isClosed() -
isReserved
public boolean isReserved()- Specified by:
isReserved
in classPool<T>.Entry
- Returns:
- whether this Entry is reserved
-
isIdle
public boolean isIdle() -
isInUse
public boolean isInUse() -
toString
-