@Configurable public abstract class AbstractPersistingCachePersistenceStrategy extends java.lang.Object implements ContentCachePersistenceStrategy, Constructable
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CACHE_FILE_FOLDER |
| Constructor and Description |
|---|
AbstractPersistingCachePersistenceStrategy() |
| Modifier and Type | Method and Description |
|---|---|
protected java.nio.file.Path |
getBasePath() |
java.nio.file.Path |
getCacheFile() |
protected java.nio.file.Path |
getCacheFileFolder() |
void |
init() |
protected boolean |
isSetCacheFileFolder() |
java.util.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(java.io.File cacheFileFolder) |
void |
setCacheFileFolder(java.nio.file.Path cacheFileFolder) |
void |
setConfigLocationProvider(ConfigLocationProvider configLocationProvider) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitpersistOnCompleteUpdate, persistOnPartialUpdate, persistOnShutdownpublic static final java.lang.String CACHE_FILE_FOLDER
public AbstractPersistingCachePersistenceStrategy()
@Inject public void setConfigLocationProvider(ConfigLocationProvider configLocationProvider)
public void init()
init in interface Constructablepublic java.nio.file.Path getCacheFile()
public java.util.Optional<WritableContentCache> load()
ContentCachePersistenceStrategyload in interface ContentCachePersistenceStrategyprotected void persistCache(ContentCache cache)
protected java.nio.file.Path getBasePath()
public void remove()
ContentCachePersistenceStrategyremove in interface ContentCachePersistenceStrategyprotected java.nio.file.Path getCacheFileFolder()
@Setting(value="service.cacheFileFolder") public void setCacheFileFolder(java.io.File cacheFileFolder)
cacheFileFolder - the cacheFileFolder to setpublic void setCacheFileFolder(java.nio.file.Path cacheFileFolder)
cacheFileFolder - the cacheFileFolder to setprotected boolean isSetCacheFileFolder()
Copyright © 2015–2018 52°North Initiative for Geospatial Open Source Software GmbH. All rights reserved.