|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.tangosol.util.MultiBinaryLongMap.ChainedLock
protected static class MultiBinaryLongMap.ChainedLock
A ChainedLock is a Lock
implementation that represents a composition of two component locks, parent and child. All operations on this lock will first be performed on the parent lock, and only upon successful completion be performed on the child lock.
A ChainedLock could be used to manage multiple logical levels of concurrency control across multiple components without exposing multiple resource locks and thus imposing a locking order that reduces the possibility of introducing deadlocks.
Note: a ChainedLock could be used to represent a chain of more than two Locks by constructing a "chain of chains".
Field Summary | |
---|---|
protected java.util.concurrent.locks.Lock |
f_lockChild The "child" constituent lock. |
protected java.util.concurrent.locks.Lock |
f_lockParent The "parent" constituent lock. |
Constructor Summary | |
---|---|
MultiBinaryLongMap.ChainedLock(java.util.concurrent.locks.Lock lockParent, java.util.concurrent.locks.Lock lockChild) Construct a new ChainedLock composed of the specified parent and child locks. |
Method Summary | |
---|---|
void |
lock() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
boolean |
tryLock() |
boolean |
tryLock(long cTime, java.util.concurrent.TimeUnit unit) |
void |
unlock() |
Field Detail |
---|
protected final java.util.concurrent.locks.Lock f_lockParent
protected final java.util.concurrent.locks.Lock f_lockChild
Constructor Detail |
---|
public MultiBinaryLongMap.ChainedLock(java.util.concurrent.locks.Lock lockParent, java.util.concurrent.locks.Lock lockChild)
lockParent
- the parent locklockChild
- the child lockMethod Detail |
---|
public void lock()
lock
in interface java.util.concurrent.locks.Lock
public void lockInterruptibly() throws java.lang.InterruptedException
lockInterruptibly
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public boolean tryLock()
tryLock
in interface java.util.concurrent.locks.Lock
public boolean tryLock(long cTime, java.util.concurrent.TimeUnit unit) throws java.lang.InterruptedException
tryLock
in interface java.util.concurrent.locks.Lock
java.lang.InterruptedException
public void unlock()
unlock
in interface java.util.concurrent.locks.Lock
public java.util.concurrent.locks.Condition newCondition()
newCondition
in interface java.util.concurrent.locks.Lock
|
Oracle® Coherence Java API Reference Release 12.1.2.0.3 E26043-02 |
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |