Class RWOLockManager.LockState<OBJECT,CONTEXT>
- java.lang.Object
- 
- org.eclipse.net4j.util.concurrent.RWOLockManager.LockState<OBJECT,CONTEXT>
 
- 
- Enclosing class:
- RWOLockManager<OBJECT,CONTEXT>
 
 public static class RWOLockManager.LockState<OBJECT,CONTEXT> extends java.lang.ObjectRepresents a combination of locks for one OBJECT. The different lock types are represented by the values of the enumIRWLockManager.LockTypeThe locking semantics established by this class are as follows: - A read lock prevents a write lock by another, but allows read locks by others and allows a write option by another, and is therefore non-exclusive.
- A write lock prevents read locks by others, a write lock by another, and a write option by another, and is therefore exclusive.
- A write option prevents write locks by others and a write option by another, but allows read locks by others, and is therefore exclusive.
 - Since:
- 3.2
- Author:
- Caspar De Groot
 
- 
- 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)OBJECTgetLockedObject()java.util.Set<CONTEXT>getReadLockOwners()CONTEXTgetWriteLockOwner()CONTEXTgetWriteOptionOwner()inthashCode()booleanhasLock(IRWLockManager.LockType type)booleanhasLock(IRWLockManager.LockType type, CONTEXT view, boolean byOthers)java.lang.StringtoString()
 
- 
- 
- 
Method Detail- 
getLockedObjectpublic OBJECT getLockedObject() 
 - 
hasLockpublic boolean hasLock(IRWLockManager.LockType type, CONTEXT view, boolean byOthers) 
 - 
hasLockpublic boolean hasLock(IRWLockManager.LockType type) 
 - 
getReadLockOwnerspublic java.util.Set<CONTEXT> getReadLockOwners() 
 - 
getWriteLockOwnerpublic CONTEXT getWriteLockOwner() 
 - 
getWriteOptionOwnerpublic CONTEXT getWriteOptionOwner() 
 - 
hashCodepublic int hashCode() - Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) - Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() - Overrides:
- toStringin class- java.lang.Object
 
 
- 
 
-