Class InstantiatingExecutorProvider (2.38.0)

public abstract class InstantiatingExecutorProvider implements ExecutorProvider

InstantiatingChannelProvider is an ExecutorProvider which constructs a new ScheduledExecutorService every time getExecutor() is called.

Inheritance

java.lang.Object > InstantiatingExecutorProvider

Implements

ExecutorProvider

Static Methods

newBuilder()

public static InstantiatingExecutorProvider.Builder newBuilder()
Returns
TypeDescription
InstantiatingExecutorProvider.Builder

newIOBuilder()

public static InstantiatingExecutorProvider.Builder newIOBuilder()
Returns
TypeDescription
InstantiatingExecutorProvider.Builder

Methods

getExecutor()

public ScheduledExecutorService getExecutor()

Gets the executor to use.

Returns
TypeDescription
ScheduledExecutorService

getExecutorThreadCount()

public abstract int getExecutorThreadCount()

The number of threads used by the executor created by this ExecutorProvider.

Returns
TypeDescription
int

getThreadFactory()

public abstract ThreadFactory getThreadFactory()

Return a thread-factory to create gax processing threads so we can name them appropriately

Returns
TypeDescription
ThreadFactory

shouldAutoClose()

public boolean shouldAutoClose()

Indicates whether the executor should be closed by the containing client class.

Returns
TypeDescription
boolean

toBuilder()

public abstract InstantiatingExecutorProvider.Builder toBuilder()
Returns
TypeDescription
InstantiatingExecutorProvider.Builder