com.jogamp.nativewindow.ToolkitLock .
A resource handle maybe used within many objects and can be synchronized across threads via an unique instance of SharedResourceToolkitLock.
Implementation holds a synchronized map from handle to reference counted SharedResourceToolkitLock.
New elements are added via get(long) if new
and removed via dispose() if no more referenced.
| Modifier and Type | Field and Description |
|---|---|
| private final long | |
| private static final LongObjectHashMap | |
| private final RecursiveLock | |
| private final AtomicInteger |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public final void | |
| public static void | |
| public static final SharedResourceToolkitLock | |
| public final void | lock()
Implements com. |
| public static int | |
| public String | |
| private String | |
| public final void | |
| public final void |
| handle | back to summary |
|---|---|
| private final long handle | |
| handle2Lock | back to summary |
|---|---|
| private static final LongObjectHashMap handle2Lock | |
| lock | back to summary |
|---|---|
| private final RecursiveLock lock | |
| refCount | back to summary |
|---|---|
| private final AtomicInteger refCount | |
| SharedResourceToolkitLock | back to summary |
|---|---|
| private SharedResourceToolkitLock(final long handle) | |
| dispose | back to summary |
|---|---|
| public final void dispose() Implements com. Doc from com. Dispose this instance. Shall be called when instance is no more required. This allows implementations sharing a lock via resources to decrease the reference counter.
| |
| dumpOpenDisplayConnections | back to summary |
|---|---|
| public static void dumpOpenDisplayConnections() | |
| get | back to summary |
|---|---|
| public static final SharedResourceToolkitLock get(final long handle) | |
| lock | back to summary |
|---|---|
| public final void lock() Implements com. Doc from com. Blocking until the lock is acquired by this Thread or a timeout is reached. Timeout is implementation specific, if used at all.
| |
| shutdown | back to summary |
|---|---|
public static int shutdown(final boolean verbose)
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object. | |
| toStringImpl | back to summary |
|---|---|
| private String toStringImpl() | |
| unlock | back to summary |
|---|---|
| public final void unlock() Implements com. Doc from com. Release the lock.
| |
| validateLocked | back to summary |
|---|---|
| public final void validateLocked() throws RuntimeException Implements com.
| |