|
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.PrimaryBinaryLongMap.ValidatingLock
protected class MultiBinaryLongMap.PrimaryBinaryLongMap.ValidatingLock
ValidatingLock is a Lock implementation specialized for the PrimaryBinaryLongMap that validates after every lock acquisition that the underlying BinaryLongMap implementation did not change.
Note: ValidatingLock is assumed to be used by the PrimaryBinaryLongMap to wrap lock implementations that are dependent (chained) to the "master" RW-lock. As the master RW-lock is used to protect any structural changes, it also implicitly serves as a JMM memory barrier that guarantees a "flush" of the map implementation reference.
| Field Summary | |
|---|---|
protected java.util.concurrent.locks.Lock |
f_lockThe underlying lock. |
protected BinaryLongMap |
m_blmImplThe primary BinaryLongMap implementation to check for |
| Constructor Summary | |
|---|---|
MultiBinaryLongMap.PrimaryBinaryLongMap.ValidatingLock(BinaryLongMap blm, java.util.concurrent.locks.Lock lock)Construct a ValidatingLock backed by the specified Lock. |
|
MultiBinaryLongMap.PrimaryBinaryLongMap.ValidatingLock(java.util.concurrent.locks.Lock lock)Construct a ValidatingLock backed by the specified Lock. |
|
| Method Summary | |
|---|---|
protected BinaryLongMap |
getImplMap()Return the primary BinaryLongMap implementation validate by this ValidatingLock. |
void |
lock() |
void |
lockInterruptibly() |
java.util.concurrent.locks.Condition |
newCondition() |
protected void |
setImplMap(BinaryLongMap blmImpl)Set the primary BinaryLongMap implementation to be validated by this ValidatingLock. |
boolean |
tryLock() |
boolean |
tryLock(long cTime, java.util.concurrent.TimeUnit unit) |
void |
unlock() |
protected void |
validate()Validate that the BinaryLongMap associated with this ValidatingLock is still the implementation map of the containing PrimaryBinaryLongMap. |
| Field Detail |
|---|
protected final java.util.concurrent.locks.Lock f_lock
protected BinaryLongMap m_blmImpl
| Constructor Detail |
|---|
public MultiBinaryLongMap.PrimaryBinaryLongMap.ValidatingLock(java.util.concurrent.locks.Lock lock)
lock - the underlying lock
public MultiBinaryLongMap.PrimaryBinaryLongMap.ValidatingLock(BinaryLongMap blm,
java.util.concurrent.locks.Lock lock)
blm - the primary BinaryLongMap implementation to validatelock - the underlying lock| Method Detail |
|---|
public void unlock()
unlock in interface java.util.concurrent.locks.Lockpublic 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 java.util.concurrent.locks.Condition newCondition()
newCondition in interface java.util.concurrent.locks.Lockprotected BinaryLongMap getImplMap()
protected void setImplMap(BinaryLongMap blmImpl)
blmImpl - the primary BinaryLongMap implementationprotected void validate()
Callers are required to hold the lock. Note: the lock provides a memory barrier ensuring visibility of updates to the map implementation of the outer PrimaryBinaryLongMap.
|
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 | |||||||