Package com.google.cloud.spanner
Class SpannerOptions.FixedCloseableExecutorProvider
- java.lang.Object
-
- com.google.cloud.spanner.SpannerOptions.FixedCloseableExecutorProvider
-
- All Implemented Interfaces:
com.google.api.gax.core.ExecutorProvider,SpannerOptions.CloseableExecutorProvider,AutoCloseable
- Enclosing class:
- SpannerOptions
public static class SpannerOptions.FixedCloseableExecutorProvider extends Object implements SpannerOptions.CloseableExecutorProvider
Implementation ofSpannerOptions.CloseableExecutorProviderthat uses a fixed singleScheduledExecutorService.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()Overridden to suppress the throws declaration of the super interface.static SpannerOptions.FixedCloseableExecutorProvidercreate(ScheduledExecutorService executor)Creates a FixedCloseableExecutorProvider.ScheduledExecutorServicegetExecutor()booleanshouldAutoClose()
-
-
-
Method Detail
-
close
public void close()
Description copied from interface:SpannerOptions.CloseableExecutorProviderOverridden to suppress the throws declaration of the super interface.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceSpannerOptions.CloseableExecutorProvider
-
getExecutor
public ScheduledExecutorService getExecutor()
- Specified by:
getExecutorin interfacecom.google.api.gax.core.ExecutorProvider
-
shouldAutoClose
public boolean shouldAutoClose()
- Specified by:
shouldAutoClosein interfacecom.google.api.gax.core.ExecutorProvider
-
create
public static SpannerOptions.FixedCloseableExecutorProvider create(ScheduledExecutorService executor)
Creates a FixedCloseableExecutorProvider.
-
-