Class ThreadedWorkerManager.AbstractManagedBlockingWorker

  • All Implemented Interfaces:
    Worker
    Enclosing class:
    ThreadedWorkerManager

    public abstract static class ThreadedWorkerManager.AbstractManagedBlockingWorker
    extends Object
    implements Worker
    This abstract class exposes the methods to allow submitting tasks for multithreading and implements inline blocking method.
    • Constructor Detail

      • AbstractManagedBlockingWorker

        public AbstractManagedBlockingWorker()
    • Method Detail

      • executeBlockingIO

        public final void executeBlockingIO​(@NotNull
                                            @NotNull Runnable task)
        Description copied from interface: Worker
        Performs the given task inline, and increase available threads in the pool by one for the execution of other tasks.

        It is imperative to wrap all I/O tasks in this method to prevent starving other parsing tasks from threads.

        Specified by:
        executeBlockingIO in interface Worker
        Parameters:
        task - the I/O blocking task to execute