|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Lock
Specifying a thread blocking lock implementation
Field Summary | |
---|---|
static boolean |
DEBUG
Enable via the property jogamp.debug.Lock |
static long |
DEFAULT_TIMEOUT
Defines the default TIMEOUT value |
static long |
TIMEOUT
Defines the TIMEOUT for lock() in ms,
and defaults to DEFAULT_TIMEOUT .It can be overriden via the system property jogamp.common.utils.locks.Lock.timeout . |
Method Summary | |
---|---|
boolean |
isLocked()
|
void |
lock()
Blocking until the lock is acquired by this Thread or 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. |
Field Detail |
---|
static final boolean DEBUG
jogamp.debug.Lock
static final long DEFAULT_TIMEOUT
TIMEOUT
value
static final long TIMEOUT
TIMEOUT
for lock()
in ms,
and defaults to DEFAULT_TIMEOUT
.jogamp.common.utils.locks.Lock.timeout
.
Method Detail |
---|
void lock() throws RuntimeException
TIMEOUT
is reached.
RuntimeException
- in case of TIMEOUT
boolean tryLock(long maxwait) throws RuntimeException
maxwait
in ms is reached.
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 false
RuntimeException
- in case of TIMEOUT
void unlock() throws RuntimeException
RuntimeException
- in case the lock is not acquired by this thread.boolean isLocked()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |