Class AbstractPersistingCachePersistenceStrategy
- java.lang.Object
-
- org.n52.iceland.cache.ctrl.persistence.AbstractPersistingCachePersistenceStrategy
-
- All Implemented Interfaces:
ContentCachePersistenceStrategy,Constructable
- Direct Known Subclasses:
AsyncCachePersistenceStrategy,ImmediatePersistenceStrategy
@Configurable public abstract class AbstractPersistingCachePersistenceStrategy extends Object implements ContentCachePersistenceStrategy, Constructable
-
-
Field Summary
Fields Modifier and Type Field Description static StringCACHE_FILE_FOLDER
-
Constructor Summary
Constructors Constructor Description AbstractPersistingCachePersistenceStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected PathgetBasePath()PathgetCacheFile()protected PathgetCacheFileFolder()voidinit()protected booleanisSetCacheFileFolder()Optional<WritableContentCache>load()Read the persisted content cache if it present.protected voidpersistCache(ContentCache cache)voidremove()Delete any persistent cache instances created by this strategy.voidsetCacheFileFolder(File cacheFileFolder)voidsetCacheFileFolder(Path cacheFileFolder)voidsetConfigLocationProvider(ConfigLocationProvider configLocationProvider)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.n52.iceland.cache.ContentCachePersistenceStrategy
persistOnCompleteUpdate, persistOnPartialUpdate, persistOnShutdown
-
-
-
-
Field Detail
-
CACHE_FILE_FOLDER
public static final String CACHE_FILE_FOLDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
setConfigLocationProvider
@Inject public void setConfigLocationProvider(ConfigLocationProvider configLocationProvider)
-
init
public void init()
- Specified by:
initin interfaceConstructable
-
getCacheFile
public Path getCacheFile()
-
load
public Optional<WritableContentCache> load()
Description copied from interface:ContentCachePersistenceStrategyRead the persisted content cache if it present.- Specified by:
loadin interfaceContentCachePersistenceStrategy- Returns:
- the cache
-
persistCache
protected void persistCache(ContentCache cache)
-
getBasePath
protected Path getBasePath()
-
remove
public void remove()
Description copied from interface:ContentCachePersistenceStrategyDelete any persistent cache instances created by this strategy.- Specified by:
removein interfaceContentCachePersistenceStrategy
-
getCacheFileFolder
protected Path getCacheFileFolder()
- Returns:
- the cacheFileFolder
-
setCacheFileFolder
@Setting(value="service.cacheFileFolder", required=false) public void setCacheFileFolder(File cacheFileFolder)
- Parameters:
cacheFileFolder- the cacheFileFolder to set
-
setCacheFileFolder
public void setCacheFileFolder(Path cacheFileFolder)
- Parameters:
cacheFileFolder- the cacheFileFolder to set
-
isSetCacheFileFolder
protected boolean isSetCacheFileFolder()
-
-