Class ExecutorTableDataRefreshService
java.lang.Object
com.illumon.iris.db.v2.locations.util.ExecutorTableDataRefreshService
- All Implemented Interfaces:
TableDataRefreshService
TableDataRefreshService implementation that uses a ScheduledThreadPoolExecutor.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.db.v2.locations.util.TableDataRefreshService
TableDataRefreshService.CancellableSubscriptionToken, TableDataRefreshService.Helper, TableDataRefreshService.Null -
Constructor Summary
ConstructorsConstructorDescriptionExecutorTableDataRefreshService(String name, long tableLocationProviderRefreshIntervalMillis, long tableLocationRefreshIntervalMillis, int threadPoolSize) -
Method Summary
Modifier and TypeMethodDescriptionscheduleTableLocationProviderRefresh(AbstractTableLocationProvider tableLocationProvider) Schedule refresh for an AbstractTableLocationProvider.scheduleTableLocationRefresh(AbstractTableLocation tableLocation) Schedule refresh for an AbstractTableLocation.voidshutdown()Shutdown the service.voidSubmit a one-time task to be run asynchronously.
-
Constructor Details
-
ExecutorTableDataRefreshService
public ExecutorTableDataRefreshService(@NotNull String name, long tableLocationProviderRefreshIntervalMillis, long tableLocationRefreshIntervalMillis, int threadPoolSize)
-
-
Method Details
-
submitOneTimeAsyncTask
Description copied from interface:TableDataRefreshServiceSubmit a one-time task to be run asynchronously.- Specified by:
submitOneTimeAsyncTaskin interfaceTableDataRefreshService- Parameters:
task- The task to run
-
scheduleTableLocationProviderRefresh
public TableDataRefreshService.CancellableSubscriptionToken scheduleTableLocationProviderRefresh(@NotNull AbstractTableLocationProvider tableLocationProvider) Description copied from interface:TableDataRefreshServiceSchedule refresh for an AbstractTableLocationProvider.- Specified by:
scheduleTableLocationProviderRefreshin interfaceTableDataRefreshService- Parameters:
tableLocationProvider- The table location provider- Returns:
- A subscription token to be used for matching, which also supports cancellation
-
scheduleTableLocationRefresh
public TableDataRefreshService.CancellableSubscriptionToken scheduleTableLocationRefresh(@NotNull AbstractTableLocation tableLocation) Description copied from interface:TableDataRefreshServiceSchedule refresh for an AbstractTableLocation.- Specified by:
scheduleTableLocationRefreshin interfaceTableDataRefreshService- Parameters:
tableLocation- The table location- Returns:
- A subscription token to be used for matching, which also supports cancellation
-
shutdown
public void shutdown()Description copied from interface:TableDataRefreshServiceShutdown the service. It will no longer be used.- Specified by:
shutdownin interfaceTableDataRefreshService
-