Specifying a thread blocking lock implementation.
More...
|
| void | lock () throws RuntimeException |
| | Blocking until the lock is acquired by this Thread or TIMEOUT is reached. More...
|
| |
| boolean | tryLock (long timeout) throws InterruptedException |
| | Blocking until the lock is acquired by this Thread or maxwait in ms is reached. More...
|
| |
| void | unlock () throws RuntimeException |
| | Release the lock. More...
|
| |
| boolean | isLocked () |
| | Query if locked. More...
|
| |
Specifying a thread blocking lock implementation.
Definition at line 36 of file Lock.java.
◆ isLocked()
| boolean com.jogamp.common.util.locks.Lock.isLocked |
( |
| ) |
|
◆ lock()
| void com.jogamp.common.util.locks.Lock.lock |
( |
| ) |
throws RuntimeException |
◆ tryLock()
| boolean com.jogamp.common.util.locks.Lock.tryLock |
( |
long |
timeout | ) |
throws InterruptedException |
Blocking until the lock is acquired by this Thread or maxwait in ms is reached.
- Parameters
-
| timeout | 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. |
- Returns
- true if the lock has been acquired within
maxwait, otherwise false
- Exceptions
-
Implemented in com.jogamp.common.util.locks.SingletonInstance.
◆ unlock()
| void com.jogamp.common.util.locks.Lock.unlock |
( |
| ) |
throws RuntimeException |
◆ DEBUG
| final boolean com.jogamp.common.util.locks.Lock.DEBUG = Debug.debug("Lock") |
|
static |
Enable via the property jogamp.debug.Lock
Definition at line 39 of file Lock.java.
◆ DEFAULT_TIMEOUT
| final long com.jogamp.common.util.locks.Lock.DEFAULT_TIMEOUT = 5000 |
|
static |
◆ TIMEOUT
| final long com.jogamp.common.util.locks.Lock.TIMEOUT = Debug.getLongProperty("jogamp.common.utils.locks.Lock.timeout", true, DEFAULT_TIMEOUT) |
|
static |
The TIMEOUT for lock() in ms, defaults to DEFAULT_TIMEOUT.
It can be overridden via the system property jogamp.common.utils.locks.Lock.timeout.
Definition at line 54 of file Lock.java.
◆ TRACE_LOCK
| final boolean com.jogamp.common.util.locks.Lock.TRACE_LOCK = Debug.isPropertyDefined("jogamp.debug.Lock.TraceLock", true) |
|
static |
Enable via the property jogamp.debug.Lock.TraceLock
Definition at line 42 of file Lock.java.
The documentation for this interface was generated from the following file:
- src/java/com/jogamp/common/util/locks/Lock.java