Class 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>

    public class ObjectSpecificFlushCallable<O2,​T>
    extends Object
    implements 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 Detail

      • task

        protected final Callable<T> task
        The task to run without any object work running.
      • abortedPending

        protected final boolean abortedPending
        Whether the flush has aborted pending work.
      • logger

        protected final Logger 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 Detail

      • 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.