private final class GenericKeyedObjectPool.Latch<LK,LV>
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private LK |
_key
key of associated pool
|
private boolean |
_mayCreate
indicates that this latch can create an instance
|
private GenericKeyedObjectPool.ObjectTimestampPair<LV> |
_pair
holds an ObjectTimestampPair when this latch has been allocated an instance
|
private GenericKeyedObjectPool.ObjectQueue |
_pool
keyed pool associated with this latch
|
Modifier | Constructor and Description |
---|---|
private |
Latch(LK key)
Create a latch with the given key
|
Modifier and Type | Method and Description |
---|---|
private LK |
getkey()
Retuns the key of the associated pool
|
private GenericKeyedObjectPool.ObjectTimestampPair<LV> |
getPair()
Gets the ObjectTimestampPair allocated to this latch.
|
private GenericKeyedObjectPool.ObjectQueue |
getPool()
Returns the pool associated with this latch
|
private boolean |
mayCreate()
Whether or not this latch can create an instance
|
private void |
reset()
Reset the latch data.
|
private void |
setMayCreate(boolean mayCreate)
Sets the mayCreate property
|
private void |
setPair(GenericKeyedObjectPool.ObjectTimestampPair<LV> pair)
Allocate an ObjectTimestampPair to this latch.
|
private void |
setPool(GenericKeyedObjectPool.ObjectQueue pool)
Sets the pool associated with this latch
|
private final LK _key
private GenericKeyedObjectPool.ObjectQueue _pool
private GenericKeyedObjectPool.ObjectTimestampPair<LV> _pair
private boolean _mayCreate
private Latch(LK key)
key
- key of the pool associated with this latchprivate LK getkey()
private GenericKeyedObjectPool.ObjectQueue getPool()
private void setPool(GenericKeyedObjectPool.ObjectQueue pool)
pool
- the poolprivate GenericKeyedObjectPool.ObjectTimestampPair<LV> getPair()
private void setPair(GenericKeyedObjectPool.ObjectTimestampPair<LV> pair)
pair
- ObjectTimestampPair on this latchprivate boolean mayCreate()
private void setMayCreate(boolean mayCreate)
mayCreate
- true means this latch can create an instanceprivate void reset()