Class InstantiatingExecutorProvider

  • All Implemented Interfaces:
    ExecutorProvider

    public abstract class InstantiatingExecutorProvider
    extends java.lang.Object
    implements ExecutorProvider
    InstantiatingChannelProvider is an ExecutorProvider which constructs a new ScheduledExecutorService every time getExecutor() is called.
    • 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
      • getExecutorThreadCount

        public abstract int getExecutorThreadCount()
        The number of threads used by the executor created by this ExecutorProvider.
      • getThreadFactory

        public abstract java.util.concurrent.ThreadFactory getThreadFactory()
        Return a thread-factory to create gax processing threads so we can name them appropriately