Class ThreadedWorkerManager.AbstractManagedBlockingWorker

  • All Implemented Interfaces:
    Worker
    Enclosing class:
    ThreadedWorkerManager

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

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void executeBlockingIO​(@NotNull java.lang.Runnable task)
      Performs the given task inline, and increase available threads in the pool by one for the execution of other tasks.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractManagedBlockingWorker

        public AbstractManagedBlockingWorker()
    • Method Detail

      • executeBlockingIO

        public final void executeBlockingIO​(@NotNull
                                            @NotNull java.lang.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