Class ThreadedWorkerManager

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  ThreadedWorkerManager.AbstractManagedBlockingWorker
      This abstract class exposes the methods to allow submitting tasks for multithreading and implements inline blocking method.
    • Constructor Summary

      Constructors 
      Constructor Description
      ThreadedWorkerManager​(java.util.concurrent.ExecutorService executor)
      Constructs a threaded worker manager with a specified executor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      Worker getWorker()
      Get the result collector in use.
      void interruptAndClose()
      Interrupt a thread and then close it.
      • Methods inherited from class java.lang.Object

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

      • ThreadedWorkerManager

        public ThreadedWorkerManager​(@Nullable
                                     java.util.concurrent.ExecutorService executor)
        Constructs a threaded worker manager with a specified executor.
        Parameters:
        executor - An executor service
    • Method Detail

      • getWorker

        public final Worker getWorker()
        Description copied from interface: WorkerManager
        Get the result collector in use.
        Specified by:
        getWorker in interface WorkerManager
        Returns:
        an instance of Worker
      • close

        public final void close()
        Specified by:
        close in interface java.lang.AutoCloseable