Top Description Fields Constructors Methods
jogamp.nativewindow

public Class GlobalToolkitLock

extends Object
implements ToolkitLock
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.ToolkitLock
Imports
com.jogamp.nativewindow.ToolkitLock, com.jogamp.common.util.locks.LockFactory, .RecursiveLock

Implementing a global recursive com.jogamp.nativewindow.ToolkitLock.

This is the last resort for unstable driver where multiple X11 display connections to the same connection name are not treated thread safe within the GL/X11 driver.

Field Summary

Modifier and TypeField and Description
private static final RecursiveLock
private static GlobalToolkitLock

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public final void
dispose()

Implements com.jogamp.nativewindow.ToolkitLock.dispose.

Dispose this instance.
public static final GlobalToolkitLock
public final void
lock()

Implements com.jogamp.nativewindow.ToolkitLock.lock.

Blocking until the lock is acquired by this Thread or a timeout is reached.
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
private String
public final void
unlock()

Implements com.jogamp.nativewindow.ToolkitLock.unlock.

Release the lock.
public final void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

globalLockback to summary
private static final RecursiveLock globalLock
singletonback to summary
private static GlobalToolkitLock singleton

Constructor Detail

GlobalToolkitLockback to summary
private GlobalToolkitLock()

Method Detail

disposeback to summary
public final void dispose()

Implements com.jogamp.nativewindow.ToolkitLock.dispose.

Doc from com.jogamp.nativewindow.ToolkitLock.dispose.

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.
Annotations
@Override
getSingletonback to summary
public static final GlobalToolkitLock getSingleton()
lockback to summary
public final void lock()

Implements com.jogamp.nativewindow.ToolkitLock.lock.

Doc from com.jogamp.nativewindow.ToolkitLock.lock.

Blocking until the lock is acquired by this Thread or a timeout is reached.

Timeout is implementation specific, if used at all.

Annotations
@Override
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object

Annotations
@Override
toStringImplback to summary
private String toStringImpl()
unlockback to summary
public final void unlock()

Implements com.jogamp.nativewindow.ToolkitLock.unlock.

Doc from com.jogamp.nativewindow.ToolkitLock.unlock.

Release the lock.

Annotations
@Override
validateLockedback to summary
public final void validateLocked() throws RuntimeException

Implements com.jogamp.nativewindow.ToolkitLock.validateLocked.

Annotations
@Override
Exceptions
RuntimeException:

Doc from com.jogamp.nativewindow.ToolkitLock.validateLocked.

if current thread does not hold the lock