|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.jogamp.common.util.locks.RecursiveLock
public class RecursiveLock
Reentrance locking toolkit, impl a complete fair FIFO scheduler
| Field Summary |
|---|
| Fields inherited from interface com.jogamp.common.util.locks.Lock |
|---|
DEBUG, DEFAULT_TIMEOUT, TIMEOUT |
| Constructor Summary | |
|---|---|
RecursiveLock()
|
|
| Method Summary | |
|---|---|
Throwable |
getLockedStack()
Returns the Throwable instance generated when this lock was taken the 1st time and if Lock.DEBUG is turned on, otherwise it returns always null. |
Thread |
getOwner()
|
int |
getRecursionCount()
|
int |
getWaitingThreadQueueSize()
|
boolean |
isLocked()
|
boolean |
isLockedByOtherThread()
|
boolean |
isOwner()
|
boolean |
isOwner(Thread thread)
|
void |
lock()
Blocking until the lock is acquired by this Thread or Lock.TIMEOUT is reached. |
boolean |
tryLock(long maxwait)
Blocking until the lock is acquired by this Thread or maxwait in ms is reached. |
void |
unlock()
Unblocking. |
void |
unlock(Runnable taskAfterUnlockBeforeNotify)
|
void |
validateLocked()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public RecursiveLock()
| Method Detail |
|---|
public final Throwable getLockedStack()
Lock.DEBUG is turned on, otherwise it returns always null.
Lock.DEBUGpublic final Thread getOwner()
getOwner in interface LockExtpublic final boolean isOwner()
isOwner in interface LockExtpublic final boolean isOwner(Thread thread)
isOwner in interface LockExtpublic final boolean isLocked()
isLocked in interface Lockpublic final boolean isLockedByOtherThread()
isLockedByOtherThread in interface LockExtpublic final int getRecursionCount()
public final void validateLocked()
validateLocked in interface LockExtpublic final void lock()
LockLock.TIMEOUT is reached.
lock in interface Lockpublic boolean tryLock(long maxwait)
Lockmaxwait in ms is reached.
tryLock in interface Lockmaxwait - Maximum time in ms to wait to acquire the lock. If this value is zero,
the call returns immediately either without being able
to acquire the lock, or with acquiring the lock directly while ignoring any scheduling order.
maxwait, otherwise falsepublic final void unlock()
Lock
unlock in interface Lockpublic final void unlock(Runnable taskAfterUnlockBeforeNotify)
public int getWaitingThreadQueueSize()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||