@Configurable public abstract class AbstractPersistingCachePersistenceStrategy extends Object implements ContentCachePersistenceStrategy, Constructable
| Modifier and Type | Field and Description |
|---|---|
static String |
CACHE_FILE_FOLDER |
| Constructor and Description |
|---|
AbstractPersistingCachePersistenceStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected Path |
getBasePath() |
Path |
getCacheFile() |
protected Path |
getCacheFileFolder() |
void |
init() |
protected boolean |
isSetCacheFileFolder() |
Optional<WritableContentCache> |
load()
Read the persisted content cache if it present.
|
protected void |
persistCache(ContentCache cache) |
void |
remove()
Delete any persistent cache instances created by this strategy.
|
void |
setCacheFileFolder(File cacheFileFolder) |
void |
setCacheFileFolder(Path cacheFileFolder) |
void |
setConfigLocationProvider(ConfigLocationProvider configLocationProvider) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpersistOnCompleteUpdate, persistOnPartialUpdate, persistOnShutdownpublic static final String CACHE_FILE_FOLDER
public AbstractPersistingCachePersistenceStrategy()
@Inject public void setConfigLocationProvider(ConfigLocationProvider configLocationProvider)
public void init()
init in interface Constructablepublic Path getCacheFile()
public Optional<WritableContentCache> load()
ContentCachePersistenceStrategyload in interface ContentCachePersistenceStrategyprotected void persistCache(ContentCache cache)
protected Path getBasePath()
public void remove()
ContentCachePersistenceStrategyremove in interface ContentCachePersistenceStrategyprotected Path getCacheFileFolder()
@Setting(value="service.cacheFileFolder") public void setCacheFileFolder(File cacheFileFolder)
cacheFileFolder - the cacheFileFolder to setpublic void setCacheFileFolder(Path cacheFileFolder)
cacheFileFolder - the cacheFileFolder to setprotected boolean isSetCacheFileFolder()
Copyright © 2015–2020 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.