Interface Pool.Entry<E>
- Type Parameters:
 E- the type of the pooled objects
- All Known Implementing Classes:
 ConcurrentPool.ConcurrentEntry, Pool.Entry.Wrapper
public static interface Pool.Entry<E>
A Pool entry that holds metadata and a pooled object.
- 
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classA wrapper forEntryinstances. - 
Method Summary
 
- 
Method Details
- 
enable
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.
- Parameters:
 pooled- the pooled object for thisEntryacquire- whether thisEntryshould be atomically enabled and acquired- Returns:
 - whether this 
Entrywas enabled - Throws:
 IllegalStateException- if thisEntrywas already enabled
 - 
getPooled
E getPooled()- Returns:
 - the pooled object
 
 - 
release
boolean release()Releases this
Entryto thePool.- Returns:
 - whether this 
Entrywas released 
 - 
remove
boolean remove()Removes this
Entryfrom thePool.- Returns:
 - whether this 
Entrywas removed 
 - 
isReserved
boolean isReserved()- Returns:
 - whether this 
Entryis reserved - See Also:
 
 - 
isIdle
boolean isIdle()- Returns:
 - whether this 
Entryis idle in thePool 
 - 
isInUse
boolean isInUse()- Returns:
 - whether this 
Entryis in use 
 - 
isTerminated
boolean isTerminated()- Returns:
 - whether this 
Entryis terminated 
 
 -