public interface ToolkitLock
Toolkit locks are created solely via NativeWindowFactory
.
One use case is the AWT locking on X11, see NativeWindowFactory.getDefaultToolkitLock(String, long)
.
Modifier and Type | Field and Description |
---|---|
static boolean |
DEBUG |
static boolean |
TRACE_LOCK |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Dispose this instance.
|
void |
lock()
Blocking until the lock is acquired by this Thread or a timeout is reached.
|
void |
unlock()
Release the lock.
|
void |
validateLocked() |
void lock()
Timeout is implementation specific, if used at all.
RuntimeException
- in case of a timeoutvoid unlock()
RuntimeException
- in case the lock is not acquired by this thread.void validateLocked() throws RuntimeException
RuntimeException
- if current thread does not hold the lockvoid dispose()
Shall be called when instance is no more required.
This allows implementations sharing a lock via resources to decrease the reference counter.Copyright 2010 JogAmp Community.