Class FixedExecutorProvider

  • All Implemented Interfaces:
    ExecutorProvider

    public final class FixedExecutorProvider
    extends java.lang.Object
    implements ExecutorProvider
    FixedExecutorProvider is an ExecutorProvider which always returns the same executor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static FixedExecutorProvider create​(java.util.concurrent.ScheduledExecutorService executor)
      Creates a FixedExecutorProvider.
      java.util.concurrent.ScheduledExecutorService getExecutor()
      Gets the executor to use.
      boolean shouldAutoClose()
      Indicates whether the executor should be closed by the containing client class.
      • Methods inherited from class java.lang.Object

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

      • getExecutor

        public java.util.concurrent.ScheduledExecutorService getExecutor()
        Description copied from interface: ExecutorProvider
        Gets the executor to use.
        Specified by:
        getExecutor in interface ExecutorProvider
      • shouldAutoClose

        public boolean shouldAutoClose()
        Description copied from interface: ExecutorProvider
        Indicates whether the executor should be closed by the containing client class.
        Specified by:
        shouldAutoClose in interface ExecutorProvider
      • create

        public static FixedExecutorProvider create​(java.util.concurrent.ScheduledExecutorService executor)
        Creates a FixedExecutorProvider.