Top Description Constructors Methods
jogamp.nativewindow

public Class NullToolkitLock

extends Object
implements ToolkitLock
Class Inheritance
All Implemented Interfaces
com.jogamp.nativewindow.ToolkitLock
Imports
com.jogamp.nativewindow.NativeWindowFactory, .ToolkitLock

Implementing a singleton global NOP com.jogamp.nativewindow.ToolkitLock without any locking. Since there is no locking it all, it is intrinsically recursive.

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public final void
dispose()

Implements com.jogamp.nativewindow.ToolkitLock.dispose.

Dispose this instance.
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

Constructor Detail

NullToolkitLockback to summary
protected NullToolkitLock()

Singleton via NativeWindowFactoryImpl#getNullToolkitLock()

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
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