Class ThreadedWorkerManager

    • Constructor Detail

      • ThreadedWorkerManager

        public ThreadedWorkerManager()
        Constructs a threaded worker manager with a specified executor.
      • ThreadedWorkerManager

        public ThreadedWorkerManager​(@Nullable
                                     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
      • interrupt

        public final void interrupt()
        Description copied from interface: Interruptible
        Interrupt the underlying mechanisms of the class.

        Please note that this interrupt method should be idempotent. In other words, calling this interrupt method more than once should not have any side effect.

        Specified by:
        interrupt in interface Interruptible