Class ObjectSpecificFlushCallable<O2,T>
java.lang.Object
de.aristaflow.adept2.util.threading.executor.ObjectSpecificFlushCallable<O2,T>
- Type Parameters:
O2- The type of objects with which runnables are managed and executed within the corresponding executor.T- The return value of this callable which is the return value of the wrapped callable.
- All Implemented Interfaces:
Callable<T>
A callable that executes a specific task exclusively without any object work running
concurrently. After the task has terminated, the object work will be restarted, unless another
exclusive task is executed concurrently.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanWhether the flush has aborted pending work.protected final Collection<ObjectRunnable<?,O2>> All pipelines of which the termination needs to be awaited.protected final AbstractObjectSpecificExecutor<?,O2, ?> The executor for restarting the object work.protected final LoggerThe logger which to use for runtime exceptions stemming from executing the task or interrupts sent when awaiting the termination of the object work.The task to run without any object work running. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedObjectSpecificFlushCallable(Callable<T> task, Collection<ObjectRunnable<?, O2>> await, boolean abortedPending, AbstractObjectSpecificExecutor<?, O2, ?> executor, Logger logger) Creates a new runnable that executes an exclusive tasks without any object work running. -
Method Summary
-
Field Details
-
task
The task to run without any object work running. -
await
All pipelines of which the termination needs to be awaited. -
abortedPending
protected final boolean abortedPendingWhether the flush has aborted pending work. -
executor
The executor for restarting the object work. -
logger
The logger which to use for runtime exceptions stemming from executing the task or interrupts sent when awaiting the termination of the object work.
-
-
Constructor Details
-
ObjectSpecificFlushCallable
protected ObjectSpecificFlushCallable(Callable<T> task, Collection<ObjectRunnable<?, O2>> await, boolean abortedPending, AbstractObjectSpecificExecutor<?, O2, ?> executor, Logger logger) Creates a new runnable that executes an exclusive tasks without any object work running.- Parameters:
task- The task to run exclusively.await- All object work for which to await its termination.abortedPending- Whether the flush has aborted pending work.executor- The object-specific pipeline executor to restart the object work after the exclusive task.logger- The logger which to use for runtime exceptions stemming from executing the task or interrupts sent when awaiting the termination of the object work.
-
-
Method Details