Top Inners Fields Constructors Methods
jogamp.opengl

public Class SharedResourceRunner

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable
Imports
java.util.Collection, .HashMap, .HashSet, .Iterator, .Map, com.jogamp.nativewindow.AbstractGraphicsDevice, .AbstractGraphicsScreen, com.jogamp.opengl.GLProfile, .GLRendererQuirks, com.jogamp.common.ExceptionUtils, com.jogamp.common.util.InterruptSource, .InterruptedRuntimeException, .SourcedInterruptedException

Nested and Inner Type Summary

Modifier and TypeClass and Description
public abstract static class
public static interface
public static interface

Field Summary

Modifier and TypeField and Description
protected static final boolean
pack-priv final HashSet<String>
pack-priv final SharedResourceRunner.Implementation
pack-priv AbstractGraphicsDevice
pack-priv boolean
pack-priv AbstractGraphicsDevice
pack-priv boolean
pack-priv boolean
pack-priv Thread

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
private void
private final void
doAndWait(final AbstractGraphicsDevice initDevice, final AbstractGraphicsDevice releaseDevice)

private boolean
public SharedResourceRunner.Resource
protected static String
public SharedResourceRunner.Resource
private void
private void
private void
public final void
run()

Implements java.lang.Runnable.run.

Runs this operation.
public Thread

Returns:

the shared resource runner thread.
start
()

Start the shared resource runner thread, if not running.

public void
stop()

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

DEBUGback to summary
protected static final boolean DEBUG
devicesTriedback to summary
pack-priv final HashSet<String> devicesTried
implback to summary
pack-priv final SharedResourceRunner.Implementation impl
initDeviceback to summary
pack-priv AbstractGraphicsDevice initDevice
readyback to summary
pack-priv boolean ready
releaseDeviceback to summary
pack-priv AbstractGraphicsDevice releaseDevice
runningback to summary
pack-priv boolean running
shouldReleaseback to summary
pack-priv boolean shouldRelease
threadback to summary
pack-priv Thread thread

Constructor Detail

SharedResourceRunnerback to summary
public SharedResourceRunner(final SharedResourceRunner.Implementation impl)

Method Detail

addDeviceTriedback to summary
private void addDeviceTried(final AbstractGraphicsDevice device)
doAndWaitback to summary
private final void doAndWait(final AbstractGraphicsDevice initDevice, final AbstractGraphicsDevice releaseDevice) throws InterruptedException
getDeviceTriedback to summary
private boolean getDeviceTried(final AbstractGraphicsDevice device)
getOrCreateSharedback to summary
public SharedResourceRunner.Resource getOrCreateShared(final AbstractGraphicsDevice device)
getThreadNameback to summary
protected static String getThreadName()
releaseSharedback to summary
public SharedResourceRunner.Resource releaseShared(final AbstractGraphicsDevice device)
releaseSharedResourcesback to summary
private void releaseSharedResources()
removeDeviceTriedback to summary
private void removeDeviceTried(final AbstractGraphicsDevice device)
resetStateback to summary
private void resetState()
runback to summary
public final void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
startback to summary
public Thread start()

Start the shared resource runner thread, if not running.

Validate the thread upfront and release all related resource if it was killed.

Returns:Thread

the shared resource runner thread.

stopback to summary
public void stop()
jogamp.opengl back to summary

public abstract Class SharedResourceRunner.AImplementation

extends Object
implements Implementation
Class Inheritance
All Implemented Interfaces
jogamp.opengl.SharedResourceRunner.Implementation
Known Direct Subclasses
jogamp.opengl.egl.EGLDrawableFactory.SharedResourceImplementation, jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.SharedResourceImplementation, jogamp.opengl.x11.glx.X11GLXDrawableFactory.SharedResourceImplementation

Field Summary

Modifier and TypeField and Description
private final HashMap<String, SharedResourceRunner.Resource>

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final void
clear()

Implements jogamp.opengl.SharedResourceRunner.Implementation.clear.

Called within synchronized block.
public Map<String, SharedResourceRunner.Resource>
getSharedMap()

Called within synchronized block.

public final SharedResourceRunner.Resource
mapGet(final AbstractGraphicsDevice device)

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapGet.

Called within synchronized block.
public final SharedResourceRunner.Resource
mapPut(final AbstractGraphicsDevice device, final SharedResourceRunner.Resource resource)

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapPut.

Called within synchronized block.
public final Collection<SharedResourceRunner.Resource>
mapValues()

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapValues.

Called within synchronized block.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

sharedMapback to summary
private final HashMap<String, SharedResourceRunner.Resource> sharedMap

Constructor Detail

AImplementationback to summary
public AImplementation()

Method Detail

clearback to summary
public final void clear()

Implements jogamp.opengl.SharedResourceRunner.Implementation.clear.

Doc from jogamp.opengl.SharedResourceRunner.Implementation.clear.

Called within synchronized block.

Annotations
@Override
getSharedMapback to summary
public Map<String, SharedResourceRunner.Resource> getSharedMap()

Called within synchronized block. Use w/ care!

mapGetback to summary
public final SharedResourceRunner.Resource mapGet(final AbstractGraphicsDevice device)

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapGet.

Doc from jogamp.opengl.SharedResourceRunner.Implementation.mapGet.

Called within synchronized block.

Annotations
@Override
mapPutback to summary
public final SharedResourceRunner.Resource mapPut(final AbstractGraphicsDevice device, final SharedResourceRunner.Resource resource)

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapPut.

Doc from jogamp.opengl.SharedResourceRunner.Implementation.mapPut.

Called within synchronized block.

Annotations
@Override
mapValuesback to summary
public final Collection<SharedResourceRunner.Resource> mapValues()

Implements jogamp.opengl.SharedResourceRunner.Implementation.mapValues.

Doc from jogamp.opengl.SharedResourceRunner.Implementation.mapValues.

Called within synchronized block.

Annotations
@Override
jogamp.opengl back to summary

public Interface SharedResourceRunner.Implementation

Known Direct Implementers
jogamp.opengl.SharedResourceRunner.AImplementation

Method Summary

Modifier and TypeMethod and Description
public void
clear()

Called within synchronized block.

public SharedResourceRunner.Resource

Returns:

A new shared resource instance
createSharedResource
(final AbstractGraphicsDevice
for creation a AbstractGraphicsDevice instance.
device
)

Called within synchronized block.

public boolean

Returns:

true if the device supports all protocols required for the implementation, otherwise false.
isDeviceSupported
(final AbstractGraphicsDevice
for creation a AbstractGraphicsDevice instance.
device
)

Called within synchronized block.

public SharedResourceRunner.Resource
mapGet(final AbstractGraphicsDevice device)

Called within synchronized block.

public SharedResourceRunner.Resource
mapPut(final AbstractGraphicsDevice device, final SharedResourceRunner.Resource resource)

Called within synchronized block.

public Collection<SharedResourceRunner.Resource>
mapValues()

Called within synchronized block.

public void
releaseSharedResource(SharedResourceRunner.Resource shared)

Called within synchronized block.

Method Detail

clearback to summary
public void clear()

Called within synchronized block.

createSharedResourceback to summary
public SharedResourceRunner.Resource createSharedResource(final AbstractGraphicsDevice device)

Called within synchronized block.

Parameters
device:AbstractGraphicsDevice

for creation a AbstractGraphicsDevice instance.

Returns:SharedResourceRunner.Resource

A new shared resource instance

isDeviceSupportedback to summary
public boolean isDeviceSupported(final AbstractGraphicsDevice device)

Called within synchronized block.

Parameters
device:AbstractGraphicsDevice

for creation a AbstractGraphicsDevice instance.

Returns:boolean

true if the device supports all protocols required for the implementation, otherwise false.

mapGetback to summary
public SharedResourceRunner.Resource mapGet(final AbstractGraphicsDevice device)

Called within synchronized block.

mapPutback to summary
public SharedResourceRunner.Resource mapPut(final AbstractGraphicsDevice device, final SharedResourceRunner.Resource resource)

Called within synchronized block.

mapValuesback to summary
public Collection<SharedResourceRunner.Resource> mapValues()

Called within synchronized block.

releaseSharedResourceback to summary
public void releaseSharedResource(SharedResourceRunner.Resource shared)

Called within synchronized block.

jogamp.opengl back to summary

public Interface SharedResourceRunner.Resource

Known Direct Implementers
jogamp.opengl.egl.EGLDrawableFactory.SharedResource, jogamp.opengl.macosx.cgl.MacOSXCGLDrawableFactory.SharedResource, jogamp.opengl.windows.wgl.WindowsWGLDrawableFactory.SharedResource, jogamp.opengl.x11.glx.X11GLXDrawableFactory.SharedResource

Method Summary

Modifier and TypeMethod and Description
public GLContextImpl
public AbstractGraphicsDevice
public GLDrawableImpl
public GLRendererQuirks
public AbstractGraphicsScreen
public boolean

Method Detail

getContextback to summary
public GLContextImpl getContext()
getDeviceback to summary
public AbstractGraphicsDevice getDevice()
getDrawableback to summary
public GLDrawableImpl getDrawable()
getRendererQuirksback to summary
public GLRendererQuirks getRendererQuirks(GLProfile glp)
getScreenback to summary
public AbstractGraphicsScreen getScreen()
isAvailableback to summary
public boolean isAvailable()