public class CacheRefresher extends Object implements Runnable
OpenSearchDataSource. After purging a cache, the top-level generic resource is retrieved
again from the IS and re-cached, ensuring that the service operates on up-to-date generic resources.
All cached description documents contained in the caches are also purged from the caches.
Depending on configuration, the refresh operation can be performed periodically on a configurable time interval in milliseconds.
If the time interval is equal to 0, no periodic refresh cycles are performed.
The cache can also be refreshed on demand, via the OpenSearchDataSource.refreshCache(org.gcube.opensearch.opensearchdatasource.stubs.RefreshCache) operation
of its portType| Constructor and Description |
|---|
CacheRefresher(long refreshIntervalMillis)
Creates a new cache refresher
|
| Modifier and Type | Method and Description |
|---|---|
void |
forceRefresh()
Schedules a forced cache refresh to be performed as soon as possible
The scheduled activation time of the next cache refresh cycle is not affected
|
void |
run()
Performs the periodic and forced cache refresh operations
|
public CacheRefresher(long refreshIntervalMillis)
refreshIntervalMillis - The time interval between cache refresh cycles, in millisecondsCopyright © 2014. All Rights Reserved.