/** * Cancels the {@link SourcePollerRunner} thread that had been previously scheduled to run at * specific intervals. Invoked by the CatalogFramework's blueprint when the framework is * unregistered/uninstalled. * * @param framework unused, but required by blueprint * @param properties unused, but required by blueprint */ public void cancel(CatalogFramework framework, Map properties) { LOGGER.debug("Cancelling scheduled polling."); runner.shutdown(); handle.cancel(true); scheduler.shutdownNow(); }
/** * Retrieves a {@link CachedSource} which contains cached values from the specified {@link * Source}. Returns a {@link Source} with values from the last polling interval. If the {@link * Source} is not known, null is returned. * * @param source the source to get the {@link CachedSource} for * @return a {@link CachedSource} which contains cached values */ public CachedSource getCachedSource(Source source) { return runner.getCachedSource(source); }