Top Inners Fields Constructors Methods
com.sun.javafx.tk.quantum

pack-priv final Class QuantumRenderer

extends ThreadPoolExecutor
Class Inheritance
Imports
java.util.Map, .HashMap, java.util.concurrent.CountDownLatch, .Future, .LinkedBlockingQueue, .RunnableFuture, .ThreadFactory, .ThreadPoolExecutor, .TimeUnit, java.util.concurrent.atomic.AtomicInteger, .AtomicReference, com.sun.glass.ui.Application, .Screen, com.sun.javafx.tk.CompletionListener, .RenderJob, com.sun.prism.GraphicsPipeline, .GraphicsResource, .Presentable, .ResourceFactory, com.sun.prism.impl.PrismSettings, com.sun.scenario.effect.impl.Renderer, com.sun.scenario.effect.impl.prism.PrFilterContext

Nested and Inner Type Summary

Modifier and TypeClass and Description
private class
private class

Field Summary

Modifier and TypeField and Description
private Throwable
private Thread
private CountDownLatch
private static final AtomicReference<QuantumRenderer>
private static boolean

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public void
afterExecute(Runnable r, Throwable t)

Overrides java.util.concurrent.ThreadPoolExecutor.afterExecute.

Method invoked upon completion of execution of the given Runnable.

pack-priv void
protected void
protected void
disposePresentable(final Presentable presentable)

public static synchronized QuantumRenderer
protected Throwable
protected <T> RunnableFuture<T>
newTaskFor(Runnable runnable, T value)

Overrides java.util.concurrent.AbstractExecutorService.newTaskFor.

Returns a RunnableFuture for the given runnable and default value.

private void
protected void
protected Future<V>
Inherited from java.util.concurrent.ThreadPoolExecutor:
allowCoreThreadTimeOutallowsCoreThreadTimeOutawaitTerminationbeforeExecuteexecutefinalizegetActiveCountgetCompletedTaskCountgetCorePoolSizegetKeepAliveTimegetLargestPoolSizegetMaximumPoolSizegetPoolSizegetQueuegetRejectedExecutionHandlergetTaskCountgetThreadFactoryisShutdownisTerminatedisTerminatingprestartAllCoreThreadsprestartCoreThreadpurgeremovesetCorePoolSizesetKeepAliveTimesetMaximumPoolSizesetRejectedExecutionHandlersetThreadFactoryshutdownshutdownNowterminatedtoString

Field Detail

_initThrowableback to summary
private Throwable _initThrowable
_rendererback to summary
private Thread _renderer
initLatchback to summary
private CountDownLatch initLatch
instanceReferenceback to summary
private static final AtomicReference<QuantumRenderer> instanceReference
usePurgatoryback to summary
private static boolean usePurgatory

Constructor Detail

QuantumRendererback to summary
private QuantumRenderer()

Method Detail

afterExecuteback to summary
public void afterExecute(Runnable r, Throwable t)

Overrides java.util.concurrent.ThreadPoolExecutor.afterExecute.

Doc from java.util.concurrent.ThreadPoolExecutor.afterExecute.

Method invoked upon completion of execution of the given Runnable. This method is invoked by the thread that executed the task. If non-null, the Throwable is the uncaught RuntimeException or Error that caused execution to terminate abruptly.

This implementation does nothing, but may be customized in subclasses.

Note

To properly nest multiple overridings, subclasses should generally invoke super.afterExecute at the beginning of this method.

Note

When actions are enclosed in tasks (such as FutureTask) either explicitly or via methods such as submit, these task objects catch and maintain computational exceptions, and so they do not cause abrupt termination, and the internal exceptions are not passed to this method. If you would like to trap both kinds of failures in this method, you can further probe for such cases, as in this sample subclass that prints either the direct cause or the underlying exception if a task has been aborted:

 class ExtendedExecutor extends ThreadPoolExecutor {
  // ...
  protected void afterExecute(Runnable r, Throwable t) {
    super.afterExecute(r, t);
    if (t == null
        && r instanceof Future<?>
        && ((Future<?>)r).isDone()) {
      try {
        Object result = ((Future<?>) r).get();
      } catch (CancellationException ce) {
        t = ce;
      } catch (ExecutionException ee) {
        t = ee.getCause();
      } catch (InterruptedException ie) {
        // ignore/reset
        Thread.currentThread().interrupt();
      }
    }
    if (t != null)
      System.out.println(t);
  }
}
Annotations
@Override
checkRendererIdleback to summary
pack-priv void checkRendererIdle()
createResourceFactoryback to summary
protected void createResourceFactory()
disposePresentableback to summary
protected void disposePresentable(final Presentable presentable)
getInstanceback to summary
public static synchronized QuantumRenderer getInstance()
initThrowableback to summary
protected Throwable initThrowable()
newTaskForback to summary
protected <T> RunnableFuture<T> newTaskFor(Runnable runnable, T value)

Overrides java.util.concurrent.AbstractExecutorService.newTaskFor.

Doc from java.util.concurrent.AbstractExecutorService.newTaskFor.

Returns a RunnableFuture for the given runnable and default value.

Annotations
@Override
setInitThrowableback to summary
private void setInitThrowable(Throwable th)
stopRendererback to summary
protected void stopRenderer()
submitRenderJobback to summary
protected Future<V> submitRenderJob(RenderJob r)
com.sun.javafx.tk.quantum back to summary

private Class QuantumRenderer.PipelineRunnable

extends Object
implements Runnable
Class Inheritance
All Implemented Interfaces
java.lang.Runnable

Field Summary

Modifier and TypeField and Description
private Runnable

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public void
public void
init()

public void
run()

Implements java.lang.Runnable.run.

Runs this operation.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

workback to summary
private Runnable work

Constructor Detail

PipelineRunnableback to summary
public PipelineRunnable(Runnable runner)

Method Detail

cleanupback to summary
public void cleanup()
initback to summary
public void init()
runback to summary
public void run()

Implements java.lang.Runnable.run.

Doc from java.lang.Runnable.run.

Runs this operation.

Annotations
@Override
com.sun.javafx.tk.quantum back to summary

private Class QuantumRenderer.QuantumThreadFactory

extends Object
implements ThreadFactory
Class Inheritance
  • java.lang.Object
  • com.sun.javafx.tk.quantum.QuantumRenderer.QuantumThreadFactory
All Implemented Interfaces
java.util.concurrent.ThreadFactory

Field Summary

Modifier and TypeField and Description
pack-priv final AtomicInteger

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public Thread
newThread(Runnable r)

Implements java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

threadNumberback to summary
pack-priv final AtomicInteger threadNumber

Constructor Detail

QuantumThreadFactoryback to summary
private QuantumThreadFactory()

Method Detail

newThreadback to summary
public Thread newThread(Runnable r)

Implements java.util.concurrent.ThreadFactory.newThread.

Doc from java.util.concurrent.ThreadFactory.newThread.

Constructs a new unstarted Thread to run the given runnable.

Annotations
@Override