com.jogamp.common.util
Class RunnableTask
java.lang.Object
com.jogamp.common.util.RunnableTask
- All Implemented Interfaces:
- Runnable
public class RunnableTask
- extends Object
- implements Runnable
Helper class to provide a Runnable queue implementation with a Runnable wrapper
which notifies after execution for the invokeAndWait()
semantics.
RunnableTask
public RunnableTask(Runnable runnable)
RunnableTask
public RunnableTask(Runnable runnable,
Object notifyObject)
RunnableTask
public RunnableTask(Runnable runnable,
Object notifyObject,
boolean catchExceptions)
getRunnable
public Runnable getRunnable()
setAttachment
public void setAttachment(Object o)
- Attach a custom object to this task.
Useful to piggybag further information, ie tag a task final.
getAttachment
public Object getAttachment()
run
public void run()
- Specified by:
run
in interface Runnable
isExecuted
public boolean isExecuted()
- Returns:
- True if executed, otherwise false;
getThrowable
public Throwable getThrowable()
- Returns:
- A Throwable thrown while execution if any
getTimestampCreate
public long getTimestampCreate()
getTimestampBeforeExec
public long getTimestampBeforeExec()
getTimestampAfterExec
public long getTimestampAfterExec()
getDurationInQueue
public long getDurationInQueue()
getDurationInExec
public long getDurationInExec()
getDurationTotal
public long getDurationTotal()
toString
public String toString()
- Overrides:
toString
in class Object