Package com.google.api.gax.core
Class InstantiatingExecutorProvider
- java.lang.Object
-
- com.google.api.gax.core.InstantiatingExecutorProvider
-
- All Implemented Interfaces:
ExecutorProvider
public abstract class InstantiatingExecutorProvider extends Object implements ExecutorProvider
InstantiatingChannelProvider is an ExecutorProvider which constructs a new ScheduledExecutorService every time getExecutor() is called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classInstantiatingExecutorProvider.Builder
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description ScheduledExecutorServicegetExecutor()Gets the executor to use.abstract intgetExecutorThreadCount()The number of threads used by the executor created by this ExecutorProvider.abstract ThreadFactorygetThreadFactory()Return a thread-factory to create gax processing threads so we can name them appropriatelystatic InstantiatingExecutorProvider.BuildernewBuilder()booleanshouldAutoClose()Indicates whether the executor should be closed by the containing client class.abstract InstantiatingExecutorProvider.BuildertoBuilder()
-
-
-
Method Detail
-
getExecutor
public ScheduledExecutorService getExecutor()
Description copied from interface:ExecutorProviderGets the executor to use.- Specified by:
getExecutorin interfaceExecutorProvider
-
shouldAutoClose
public boolean shouldAutoClose()
Description copied from interface:ExecutorProviderIndicates whether the executor should be closed by the containing client class.- Specified by:
shouldAutoClosein interfaceExecutorProvider
-
getExecutorThreadCount
public abstract int getExecutorThreadCount()
The number of threads used by the executor created by this ExecutorProvider.
-
getThreadFactory
public abstract ThreadFactory getThreadFactory()
Return a thread-factory to create gax processing threads so we can name them appropriately
-
toBuilder
public abstract InstantiatingExecutorProvider.Builder toBuilder()
-
newBuilder
public static InstantiatingExecutorProvider.Builder newBuilder()
-
-