Modifier and Type | Method and Description |
---|---|
boolean |
enable(T pooled,
boolean acquire)
Enable a reserved entry
Pool.Entry . |
T |
getPooled() |
int |
getUsageCount() |
boolean |
isClosed() |
boolean |
isIdle() |
boolean |
isInUse() |
boolean |
isOverUsed() |
boolean |
isReserved() |
boolean |
release()
Release the entry.
|
boolean |
remove()
Remove the entry.
|
java.lang.String |
toString() |
public boolean enable(T pooled, boolean acquire)
Pool.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 closed.pooled
- The pooled item for the entryacquire
- If true the entry is atomically enabled and acquired.java.lang.IllegalStateException
- if the entry was already enabledpublic T getPooled()
public boolean release()
Pool.release(Pool.Entry)
passing this entry.public boolean remove()
Pool.remove(Pool.Entry)
passing this entry.public boolean isClosed()
public boolean isReserved()
public boolean isIdle()
public boolean isInUse()
public boolean isOverUsed()
public int getUsageCount()
public java.lang.String toString()
toString
in class java.lang.Object
Copyright © 1995–2021 Webtide. All rights reserved.