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 java.lang.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 java.util.concurrent.ScheduledExecutorServicegetExecutor()Gets the executor to use.abstract intgetExecutorThreadCount()The number of threads used by the executor created by this ExecutorProvider.abstract java.util.concurrent.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 java.util.concurrent.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 java.util.concurrent.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()
-
-