|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.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.DEBUG
public final Thread getOwner()
getOwner
in interface LockExt
public final boolean isOwner()
isOwner
in interface LockExt
public final boolean isOwner(Thread thread)
isOwner
in interface LockExt
public final boolean isLocked()
isLocked
in interface Lock
public final boolean isLockedByOtherThread()
isLockedByOtherThread
in interface LockExt
public final int getRecursionCount()
public final void validateLocked()
validateLocked
in interface LockExt
public final void lock()
Lock
Lock.TIMEOUT
is reached.
lock
in interface Lock
public boolean tryLock(long maxwait)
Lock
maxwait
in ms is reached.
tryLock
in interface Lock
maxwait
- 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 Lock
public final void unlock(Runnable taskAfterUnlockBeforeNotify)
public int getWaitingThreadQueueSize()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |