|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.terracotta.locking.TerracottaReadWriteLock
public class TerracottaReadWriteLock
A Terracotta clusterable implementation of ReadWriteLock.
Instances can be used in both clustered and unclustered scenarios, but care must be taken to only connect instances to the clustered heap when the lock is in a fully unlocked state to avoid unspecified errors during subsequent unlocking.
Behaviors:
| Constructor Summary | |
|---|---|
TerracottaReadWriteLock()
Constructs a new TerracottaReadWriteLock with the default write lock behavior. |
|
TerracottaReadWriteLock(boolean synchronousWrite)
Constructs a new TerracottaReadWriteLock with the defined write lock behavior. |
|
| Method Summary | |
|---|---|
boolean |
isWriteLockedByCurrentThread()
Check if the write lock is held by the current thread. |
Lock |
readLock()
|
Lock |
writeLock()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TerracottaReadWriteLock()
public TerracottaReadWriteLock(boolean synchronousWrite)
If synchronous write is set to true then mutations performed within the scope of this locks write lock are synchronously persisted before the unlocking thread returns.
synchronousWrite - true if write locks should be synchronous| Method Detail |
|---|
public Lock readLock()
readLock in interface ReadWriteLockpublic Lock writeLock()
writeLock in interface ReadWriteLockpublic boolean isWriteLockedByCurrentThread()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||