invokeAndWait() semantics.
| Modifier and Type | Field and Description |
|---|---|
| protected A[] | |
| protected R | |
| protected Function |
| Access | Constructor and Description |
|---|---|
| public | FunctionTask(final Function<R, A>
the user action runnable, final Object the synchronization object the caller shall wait until syncObject, final boolean runnable execution is completed,
or null if waiting is not desired.Influence an occurring exception during catchExceptions, final PrintStream runnable execution.
If true, the exception is silenced and can be retrieved via getThrowable(),
otherwise the exception is thrown.If not exceptionOut)null, exceptions are written to this PrintStream.Create a RunnableTask object w/ synchronization, ie. |
| Modifier and Type | Method and Description |
|---|---|
| public final R | eval(final A...
variable argument list, args)A[], maybe nullImplements com. args list
and returns a result.
|
| public final R | |
| public final Function | |
| public static <U, V> U | invoke(final boolean waitUntilDone, final Function<U, V> func, final V... args)
Deprecated
Simply invoke
Function#eval(Object.
|
| public static <U, V> FunctionTask | Returns: the newly created and invokedFunctionTaskthe tg, final String ThreadGroup for the new thread, maybe nullthe name for the new thread, maybe threadName, final boolean nullif waitUntilDone, final Function<U, V> true, waits until func execution is completed, otherwise returns immediately.the func, final V... Function to execute.the args)Function argumentsInvokes |
| public final void | run()
Implements abstract com. Implements java. |
| public final void |
| args | back to summary |
|---|---|
| protected A[] args | |
| result | back to summary |
|---|---|
| protected R result | |
| runnable | back to summary |
|---|---|
| protected Function<R, A> runnable | |
| FunctionTask | back to summary |
|---|---|
| public FunctionTask(final Function<R, A> runnable, final Object syncObject, final boolean catchExceptions, final PrintStream exceptionOut) Create a RunnableTask object w/ synchronization,
ie. suitable for
| |
| eval | back to summary |
|---|---|
| public final R eval(final A... args) Implements com. Doc from com. Implementation may compute variable
| |
| getResult | back to summary |
|---|---|
| public final R getResult() Retrieves the cached result of | |
| getRunnable | back to summary |
|---|---|
| public final Function Return the user action | |
| invoke | back to summary |
|---|---|
| public static <U, V> U invoke(final boolean waitUntilDone, final Function<U, V> func, final V... args)
Deprecated Simply invoke | |
| invokeOnNewThread | back to summary |
|---|---|
| public static <U, V> FunctionTask Invokes
The result can be retrieved via
| |
| run | back to summary |
|---|---|
| public final void run() Implements abstract com. Implements java. Doc from java. Runs this operation.
Calls
You may set the
| |
| setArgs | back to summary |
|---|---|
| public final void setArgs(final A... args) Sets the arguments for | |