Package com.google.api.gax.rpc
Class FixedWatchdogProvider
- java.lang.Object
-
- com.google.api.gax.rpc.FixedWatchdogProvider
-
- All Implemented Interfaces:
WatchdogProvider
@InternalApi public final class FixedWatchdogProvider extends Object implements WatchdogProvider
A watchdog provider which always returns the same watchdog instance provided to the provider during construction.This is the internal class and is public only for technical reasons. It may change any time without notice, please do not depend on it explicitly.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static WatchdogProvidercreate(Watchdog watchdog)WatchdoggetWatchdog()booleanneedsCheckInterval()booleanneedsClock()booleanneedsExecutor()booleanshouldAutoClose()Return true if the watchdog should be automatically unscheduled.WatchdogProviderwithCheckInterval(org.threeten.bp.Duration checkInterval)WatchdogProviderwithClock(ApiClock clock)WatchdogProviderwithExecutor(ScheduledExecutorService executor)
-
-
-
Method Detail
-
create
public static WatchdogProvider create(Watchdog watchdog)
-
needsClock
public boolean needsClock()
- Specified by:
needsClockin interfaceWatchdogProvider
-
withClock
public WatchdogProvider withClock(@Nonnull ApiClock clock)
- Specified by:
withClockin interfaceWatchdogProvider
-
needsCheckInterval
public boolean needsCheckInterval()
- Specified by:
needsCheckIntervalin interfaceWatchdogProvider
-
withCheckInterval
public WatchdogProvider withCheckInterval(org.threeten.bp.Duration checkInterval)
- Specified by:
withCheckIntervalin interfaceWatchdogProvider
-
needsExecutor
public boolean needsExecutor()
- Specified by:
needsExecutorin interfaceWatchdogProvider
-
withExecutor
public WatchdogProvider withExecutor(ScheduledExecutorService executor)
- Specified by:
withExecutorin interfaceWatchdogProvider
-
getWatchdog
public Watchdog getWatchdog()
- Specified by:
getWatchdogin interfaceWatchdogProvider
-
shouldAutoClose
public boolean shouldAutoClose()
Description copied from interface:WatchdogProviderReturn true if the watchdog should be automatically unscheduled.- Specified by:
shouldAutoClosein interfaceWatchdogProvider
-
-