Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after execution for the invokeAndWait() semantics.
More...
Helper class to provide a Runnable queue implementation with a Runnable wrapper which notifies after execution for the invokeAndWait() semantics.
Definition at line 39 of file TaskBase.java.
◆ TaskBase()
| com.jogamp.common.util.TaskBase.TaskBase |
( |
final Object |
syncObject, |
|
|
final boolean |
catchExceptions, |
|
|
final PrintStream |
exceptionOut |
|
) |
| |
|
protected |
- Parameters
-
| syncObject | The synchronization object if caller wait until runnable execution is completed, or null if waiting is not desired. |
| catchExceptions | Influence an occurring exception during runnable execution. If true, the exception is silenced and can be retrieved via getThrowable(), otherwise the exception is thrown. |
| exceptionOut | If not null, exceptions are written to this PrintStream. |
Definition at line 69 of file TaskBase.java.
◆ flush()
| final void com.jogamp.common.util.TaskBase.flush |
( |
final Throwable |
t | ) |
|
Simply flush this task and notify a waiting executor.
The executor which might have been blocked until notified will be unblocked and the task removed from the queue.
- Parameters
-
| t | optional Throwable to be assigned for later getThrowable() query in case of an error. |
- See also
- isFlushed()
-
isInQueue()
Definition at line 136 of file TaskBase.java.
◆ getAttachment()
| final Object com.jogamp.common.util.TaskBase.getAttachment |
( |
| ) |
|
◆ getDurationInExec()
| final long com.jogamp.common.util.TaskBase.getDurationInExec |
( |
| ) |
|
◆ getDurationInQueue()
| final long com.jogamp.common.util.TaskBase.getDurationInQueue |
( |
| ) |
|
◆ getDurationTotal()
| final long com.jogamp.common.util.TaskBase.getDurationTotal |
( |
| ) |
|
◆ getExceptionOutIntro()
| final String com.jogamp.common.util.TaskBase.getExceptionOutIntro |
( |
| ) |
|
|
protected |
◆ getExecutionThread()
| final Thread com.jogamp.common.util.TaskBase.getExecutionThread |
( |
| ) |
|
Returns the execution thread or null if not yet run().
- Since
- 2.3.2
Definition at line 95 of file TaskBase.java.
◆ getSyncObject()
| final Object com.jogamp.common.util.TaskBase.getSyncObject |
( |
| ) |
|
Return the synchronization object if any.
- See also
- #RunnableTask(Runnable, Object, boolean)
Definition at line 103 of file TaskBase.java.
◆ getThrowable()
| final Throwable com.jogamp.common.util.TaskBase.getThrowable |
( |
| ) |
|
- Returns
- A thrown exception while execution of the user action, if any and if caught
- See also
- #RunnableTask(Runnable, Object, boolean)
Definition at line 171 of file TaskBase.java.
◆ getTimestampAfterExec()
| final long com.jogamp.common.util.TaskBase.getTimestampAfterExec |
( |
| ) |
|
◆ getTimestampBeforeExec()
| final long com.jogamp.common.util.TaskBase.getTimestampBeforeExec |
( |
| ) |
|
◆ getTimestampCreate()
| final long com.jogamp.common.util.TaskBase.getTimestampCreate |
( |
| ) |
|
◆ hasWaiter()
| final boolean com.jogamp.common.util.TaskBase.hasWaiter |
( |
| ) |
|
- Returns
- True if invoking thread waits until done, ie a
notifyObject was passed, otherwise false;
Definition at line 165 of file TaskBase.java.
◆ isExecuted()
| final boolean com.jogamp.common.util.TaskBase.isExecuted |
( |
| ) |
|
- Returns
- True if executed, otherwise false;
Definition at line 154 of file TaskBase.java.
◆ isFlushed()
| final boolean com.jogamp.common.util.TaskBase.isFlushed |
( |
| ) |
|
- Returns
- True if flushed, otherwise false;
Definition at line 159 of file TaskBase.java.
◆ isInQueue()
| final boolean com.jogamp.common.util.TaskBase.isInQueue |
( |
| ) |
|
◆ printSourceTrace()
| final void com.jogamp.common.util.TaskBase.printSourceTrace |
( |
| ) |
|
|
protected |
◆ run()
| abstract void com.jogamp.common.util.TaskBase.run |
( |
| ) |
|
|
abstract |
◆ setAttachment()
| final void com.jogamp.common.util.TaskBase.setAttachment |
( |
final Object |
o | ) |
|
Attach a custom object to this task.
Useful to piggybag further information, ie tag a task final.
Definition at line 111 of file TaskBase.java.
◆ toString()
| String com.jogamp.common.util.TaskBase.toString |
( |
| ) |
|
◆ attachment
| Object com.jogamp.common.util.TaskBase.attachment |
|
protected |
◆ catchExceptions
| final boolean com.jogamp.common.util.TaskBase.catchExceptions |
|
protected |
◆ exceptionOut
| final PrintStream com.jogamp.common.util.TaskBase.exceptionOut |
|
protected |
◆ execThread
| volatile Thread com.jogamp.common.util.TaskBase.execThread |
|
protected |
◆ isExecuted
| volatile boolean com.jogamp.common.util.TaskBase.isExecuted |
|
protected |
◆ isFlushed
| volatile boolean com.jogamp.common.util.TaskBase.isFlushed |
|
protected |
◆ runnableException
| Throwable com.jogamp.common.util.TaskBase.runnableException |
|
protected |
◆ sourceStack
| final Throwable com.jogamp.common.util.TaskBase.sourceStack |
|
protected |
◆ syncObject
| final Object com.jogamp.common.util.TaskBase.syncObject |
|
protected |
◆ tCreated
| long com.jogamp.common.util.TaskBase.tCreated |
|
protected |
◆ tExecuted
| volatile long com.jogamp.common.util.TaskBase.tExecuted |
|
protected |
◆ tStarted
| long com.jogamp.common.util.TaskBase.tStarted |
|
protected |
The documentation for this class was generated from the following file: