|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ToolkitLock
Marker for a singleton global recursive blocking lock implementation, optionally locking a native windowing toolkit as well.
Toolkit locks are created solely via NativeWindowFactory
.
One use case is the AWT locking on X11, see NativeWindowFactory.getDefaultToolkitLock(String, long)
.
Field Summary | |
---|---|
static boolean |
DEBUG
|
static boolean |
TRACE_LOCK
|
Method Summary | |
---|---|
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()
|
Field Detail |
---|
static final boolean DEBUG
static final boolean TRACE_LOCK
Method Detail |
---|
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.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |