29package com.jogamp.common.util;
31import java.io.PrintStream;
33import jogamp.common.Debug;
39public abstract class TaskBase implements Runnable {
41 private static final boolean TRACE_SOURCE;
44 Debug.initSingleton();
73 this.sourceStack = TRACE_SOURCE ?
new Throwable(
"Creation @") :
null;
74 this.tCreated = System.currentTimeMillis();
77 this.isExecuted =
false;
78 this.isFlushed =
false;
79 this.execThread =
null;
124 public abstract void run();
136 public final void flush(
final Throwable t) {
186 eth =
"0x"+Integer.toHexString(
execThread.hashCode());
Helper routines for accessing properties.
static final boolean isPropertyDefined(final String property, final boolean jnlpAlias)
Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after ...
final boolean isExecuted()
final void printSourceTrace()
final long getTimestampBeforeExec()
final Object getSyncObject()
Return the synchronization object if any.
Throwable runnableException
final void setAttachment(final Object o)
Attach a custom object to this task.
final String getExceptionOutIntro()
TaskBase(final Object syncObject, final boolean catchExceptions, final PrintStream exceptionOut)
final Throwable getThrowable()
final boolean hasWaiter()
final long getDurationInExec()
final Object getAttachment()
Return the attachment object if any.
final boolean isInQueue()
final long getTimestampAfterExec()
final long getDurationInQueue()
final boolean catchExceptions
final Thread getExecutionThread()
Returns the execution thread or null if not yet run().
final void flush(final Throwable t)
Simply flush this task and notify a waiting executor.
volatile Thread execThread
final Throwable sourceStack
final long getDurationTotal()
volatile boolean isExecuted
final long getTimestampCreate()
final PrintStream exceptionOut
final boolean isFlushed()
volatile boolean isFlushed