public abstract class ExecutingExecutionStrategy extends Object implements ExecutionStrategy
Base class for strategies that need to execute a task by submitting it to an Executor.
If the submission to the Executor is rejected (via a RejectedExecutionException),
the task is tested whether it implements Closeable; if it does, then Closeable.close()
is called on the task object.
ExecutionStrategy.DefaultExecutionStrategyFactory, ExecutionStrategy.Factory, ExecutionStrategy.Producer| Modifier | Constructor and Description |
|---|---|
protected |
ExecutingExecutionStrategy(Executor executor,
Invocable.InvocationType preferred) |
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
execute(Runnable task) |
Invocable.InvocationType |
getPreferredInvocationType() |
void |
invoke(Runnable task) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdispatch, produceprotected ExecutingExecutionStrategy(Executor executor, Invocable.InvocationType preferred)
public Invocable.InvocationType getPreferredInvocationType()
public void invoke(Runnable task)
protected boolean execute(Runnable task)
Copyright © 1995–2017 Webtide. All rights reserved.