Package org.eclipse.jetty.util
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>
A wrapper for Entry
instances.
-
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
-
Wrapper
-
-
Method Details
-
getWrapped
-
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<W>
- 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<W>
- 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<W>
- 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<W>
- Returns:
- whether this
Entry
was removed
-
isReserved
public boolean isReserved()- Specified by:
isReserved
in interfacePool.Entry<W>
- Returns:
- whether this
Entry
is reserved - See Also:
-
isIdle
public boolean isIdle()- Specified by:
isIdle
in interfacePool.Entry<W>
- Returns:
- whether this
Entry
is idle in thePool
-
isInUse
public boolean isInUse()- Specified by:
isInUse
in interfacePool.Entry<W>
- Returns:
- whether this
Entry
is in use
-
isTerminated
public boolean isTerminated()- Specified by:
isTerminated
in interfacePool.Entry<W>
- Returns:
- whether this
Entry
is terminated
-