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 java.lang.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(java.util.concurrent.ScheduledExecutorService executor)Creates a FixedExecutorProvider.java.util.concurrent.ScheduledExecutorServicegetExecutor()Gets the executor to use.booleanshouldAutoClose()Indicates whether the executor should be closed by the containing client class.
-
-
-
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
-
create
public static FixedExecutorProvider create(java.util.concurrent.ScheduledExecutorService executor)
Creates a FixedExecutorProvider.
-
-