Top Description Fields Constructors Methods
jogamp.nativewindow

public Class ResourceToolkitLock

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 resource based recursive com.jogamp.nativewindow.ToolkitLock.

A resource handle maybe used within a unique object and can be synchronized across threads via an instance of ResourceToolkitLock.

Field Summary

Modifier and TypeField and Description
private final RecursiveLock

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static final ResourceToolkitLock
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

Field Detail

lockback to summary
private final RecursiveLock lock

Constructor Detail

ResourceToolkitLockback to summary
private ResourceToolkitLock()

Method Detail

createback to summary
public static final ResourceToolkitLock create()
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