|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| 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_lockChildThe "child" constituent lock. |
protected java.util.concurrent.locks.Lock |
f_lockParentThe "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 lock| Method 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.Lockjava.lang.InterruptedExceptionpublic 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.Lockjava.lang.InterruptedExceptionpublic void unlock()
unlock in interface java.util.concurrent.locks.Lockpublic java.util.concurrent.locks.Condition newCondition()
newCondition in interface java.util.concurrent.locks.Lock
|
Oracle® Fusion Middleware Java API Reference for Oracle Coherence 12c (12.1.3.0.0) E47890-01 |
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||