Package com.google.api.gax.core
Class FixedExecutorProvider
- java.lang.Object
-
- com.google.api.gax.core.FixedExecutorProvider
-
- All Implemented Interfaces:
ExecutorProvider
public final class FixedExecutorProvider extends Object implements ExecutorProvider
FixedExecutorProvider is an ExecutorProvider which always returns the same executor.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static FixedExecutorProvidercreate(ScheduledExecutorService executor)Creates a FixedExecutorProvider.ScheduledExecutorServicegetExecutor()Gets the executor to use.booleanshouldAutoClose()Indicates whether the executor should be closed by the containing client class.
-
-
-
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
-
create
public static FixedExecutorProvider create(ScheduledExecutorService executor)
Creates a FixedExecutorProvider.
-
-