com.jogamp.common.util.locks
Interface LockExt

All Superinterfaces:
Lock
All Known Subinterfaces:
RecursiveLock, RecursiveThreadGroupLock

public interface LockExt
extends Lock

Extending the Lock features with convenient functionality.


Field Summary
 
Fields inherited from interface com.jogamp.common.util.locks.Lock
DEBUG, DEFAULT_TIMEOUT, TIMEOUT, TRACE_LOCK
 
Method Summary
 Thread getOwner()
           
 boolean isLockedByOtherThread()
           
 boolean isOwner()
           
 boolean isOwner(Thread thread)
           
 void unlock(Runnable taskAfterUnlockBeforeNotify)
          Execute the Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock.
 void validateLocked()
           
 
Methods inherited from interface com.jogamp.common.util.locks.Lock
isLocked, lock, tryLock, unlock
 

Method Detail

getOwner

Thread getOwner()
Returns:
the Thread owning this lock if locked, otherwise null

isLockedByOtherThread

boolean isLockedByOtherThread()

isOwner

boolean isOwner()

isOwner

boolean isOwner(Thread thread)

validateLocked

void validateLocked()
                    throws RuntimeException
Throws:
RuntimeException - if current thread does not hold the lock

unlock

void unlock(Runnable taskAfterUnlockBeforeNotify)
Execute the Runnable taskAfterUnlockBeforeNotify while holding the exclusive lock.

Then release the lock.