Class InstantiatingExecutorProvider (2.58.0)

See more code actions.
public abstract class InstantiatingExecutorProvider implements ExecutorProvider

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

java.lang.Object > InstantiatingExecutorProvider
ExecutorProvider

Static Methods

newBuilder()

public static InstantiatingExecutorProvider.Builder newBuilder()
Returns
Type Description
InstantiatingExecutorProvider.Builder

newIOBuilder()

public static InstantiatingExecutorProvider.Builder newIOBuilder()
Returns
Type Description
InstantiatingExecutorProvider.Builder

Methods

getExecutor()

public ScheduledExecutorService getExecutor()

Gets the executor to use.

Returns
Type Description
ScheduledExecutorService

getExecutorThreadCount()

public abstract int getExecutorThreadCount()

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

Returns
Type Description
int

getThreadFactory()

public abstract ThreadFactory getThreadFactory()

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

Returns
Type Description
ThreadFactory

shouldAutoClose()

public boolean shouldAutoClose()

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

Returns
Type Description
boolean

toBuilder()

public abstract InstantiatingExecutorProvider.Builder toBuilder()
Returns
Type Description
InstantiatingExecutorProvider.Builder