|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jogamp.common.util.TaskBase
public abstract class TaskBase
Helper class to provide a Runnable queue implementation with a Runnable wrapper
which notifies after execution for the invokeAndWait()
semantics.
Field Summary | |
---|---|
protected Object |
attachment
|
protected boolean |
catchExceptions
|
protected PrintStream |
exceptionOut
|
protected boolean |
isFlushed
|
protected Throwable |
runnableException
|
protected Throwable |
sourceStack
|
protected Object |
syncObject
|
protected long |
tCreated
|
protected long |
tExecuted
|
protected long |
tStarted
|
Constructor Summary | |
---|---|
protected |
TaskBase(Object syncObject,
boolean catchExceptions,
PrintStream exceptionOut)
|
Method Summary | |
---|---|
void |
flush()
Simply flush this task and notify a waiting executor. |
Object |
getAttachment()
Return the attachment object if any. |
long |
getDurationInExec()
|
long |
getDurationInQueue()
|
long |
getDurationTotal()
|
protected String |
getExceptionOutIntro()
|
Object |
getSyncObject()
Return the synchronization object if any. |
Throwable |
getThrowable()
|
long |
getTimestampAfterExec()
|
long |
getTimestampBeforeExec()
|
long |
getTimestampCreate()
|
boolean |
hasWaiter()
|
boolean |
isExecuted()
|
boolean |
isFlushed()
|
boolean |
isInQueue()
|
protected void |
printSourceTrace()
|
abstract void |
run()
|
void |
setAttachment(Object o)
Attach a custom object to this task. |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected final Object syncObject
protected final boolean catchExceptions
protected final PrintStream exceptionOut
protected final Throwable sourceStack
protected Object attachment
protected Throwable runnableException
protected long tCreated
protected long tStarted
protected volatile long tExecuted
protected volatile boolean isFlushed
Constructor Detail |
---|
protected TaskBase(Object syncObject, boolean catchExceptions, PrintStream exceptionOut)
Method Detail |
---|
protected final String getExceptionOutIntro()
protected final void printSourceTrace()
public final Object getSyncObject()
#RunnableTask(Runnable, Object, boolean)
public final void setAttachment(Object o)
public final Object getAttachment()
setAttachment(Object)
public abstract void run()
run
in interface Runnable
public final void flush()
isFlushed()
,
isInQueue()
public final boolean isInQueue()
isExecuted()
&& !isFlushed()
public final boolean isExecuted()
public final boolean isFlushed()
public final boolean hasWaiter()
notifyObject
was passed, otherwise false;public final Throwable getThrowable()
#RunnableTask(Runnable, Object, boolean)
public final long getTimestampCreate()
public final long getTimestampBeforeExec()
public final long getTimestampAfterExec()
public final long getDurationInQueue()
public final long getDurationInExec()
public final long getDurationTotal()
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |