27package jau.test.util.parallel.locks;
29import org.jau.sys.Debug;
59 void lock() throws RuntimeException;
71 boolean tryLock(
long timeout) throws InterruptedException;
78 void unlock() throws RuntimeException;
Helper routines for logging and debugging.
static final boolean debug(final String subcomponent)
static final long getLongProperty(final String property, final boolean jnlpAlias, final long defaultValue)
static final boolean isPropertyDefined(final String property, final boolean jnlpAlias)
Specifying a thread blocking lock implementation.
static final long TIMEOUT
The TIMEOUT for lock() in ms, defaults to DEFAULT_TIMEOUT.
static final boolean DEBUG
Enable via the property jogamp.debug.Lock
boolean tryLock(long timeout)
Blocking until the lock is acquired by this Thread or maxwait in ms is reached.
void lock()
Blocking until the lock is acquired by this Thread or TIMEOUT is reached.
void unlock()
Release the lock.
static final boolean TRACE_LOCK
Enable via the property jogamp.debug.Lock.TraceLock
static final long DEFAULT_TIMEOUT
The default TIMEOUT value, of {@value} ms.
boolean isLocked()
Query if locked.