|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.geometry.internal.TreeLock
public class TreeLock
Provides convenience methods for locking tree like data structures.
| Constructor Summary | |
|---|---|
TreeLock(boolean fair)
Constructor. |
|
| Method Summary | |
|---|---|
MultiLock |
getMultiWriteLock(TreeLock otherLockToGet)
Obtains a write lock for this lock and another TreeLock and avoids deadlock situations. |
Lock |
getSafeReadLock()
Obtains a read lock for the tree. |
Lock |
getSafeWriteLock()
Obtains a write lock for the tree. |
ReentrantReadWriteLock |
getTreeLock()
|
void |
setTreeLock(ReentrantReadWriteLock lock)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TreeLock(boolean fair)
fair - true if the lock initially used with this tree lock should use a fair ordering| Method Detail |
|---|
public ReentrantReadWriteLock getTreeLock()
ReentrantReadWriteLock used internallypublic void setTreeLock(ReentrantReadWriteLock lock)
lock - the new lock to be setpublic Lock getSafeWriteLock()
public Lock getSafeReadLock()
public MultiLock getMultiWriteLock(TreeLock otherLockToGet)
otherLockToGet - the other lock to obtain
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||