Package org.eclipse.jetty.util
Class ConcurrentPool.ConcurrentEntry<E>
java.lang.Object
org.eclipse.jetty.util.ConcurrentPool.ConcurrentEntry<E>
- All Implemented Interfaces:
Pool.Entry<E>
- Enclosing class:
- ConcurrentPool<P>
A Pool entry that holds metadata and a pooled object.
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.util.Pool.Entry
Pool.Entry.Wrapper<W>
-
Constructor Summary
-
Method Summary
-
Constructor Details
-
ConcurrentEntry
-
-
Method Details
-
enable
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 interfacePool.Entry<E>
- Parameters:
pooled
- the pooled object for thisEntry
acquire
- whether thisEntry
should be atomically enabled and acquired- Returns:
- whether this
Entry
was enabled
-
getPooled
- Specified by:
getPooled
in interfacePool.Entry<E>
- Returns:
- the pooled object
-
release
public boolean release()Description copied from interface:Pool.Entry
Releases this
Entry
to thePool
.- Specified by:
release
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
was released
-
remove
public boolean remove()Description copied from interface:Pool.Entry
Removes this
Entry
from thePool
.- Specified by:
remove
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
was removed
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminated
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
is terminated
-
isReserved
public boolean isReserved()- Specified by:
isReserved
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
is reserved - See Also:
-
isIdle
public boolean isIdle()- Specified by:
isIdle
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
is idle in thePool
-
isInUse
public boolean isInUse()- Specified by:
isInUse
in interfacePool.Entry<E>
- Returns:
- whether this
Entry
is in use
-
toString
-