Package org.ehcache
Interface PersistentCacheManager
-
- All Superinterfaces:
java.lang.AutoCloseable,CacheManager,java.io.Closeable
public interface PersistentCacheManager extends CacheManager
ACacheManagerthat knows how to lifecycle caches that can outlive the JVM.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddestroy()Destroys all persistent data associated with thisPersistentCacheManager.voiddestroyCache(java.lang.String alias)Destroys all data persistent data associated with the aliasedCacheinstance managed by thisCacheManager.-
Methods inherited from interface org.ehcache.CacheManager
close, createCache, createCache, getCache, getRuntimeConfiguration, getStatus, init, removeCache
-
-
-
-
Method Detail
-
destroy
void destroy() throws CachePersistenceExceptionDestroys all persistent data associated with thisPersistentCacheManager.This is achieved by putting the
CacheManagerinMAINTENANCEmode, executing the destroy and then exiting theMAINTENANCEmode.- Throws:
java.lang.IllegalStateException- if state maintenance couldn't be reachedCachePersistenceException- when something goes wrong destroying the persistent data
-
destroyCache
void destroyCache(java.lang.String alias) throws CachePersistenceExceptionDestroys all data persistent data associated with the aliasedCacheinstance managed by thisCacheManager.This requires the
CacheManagerto be either inAVAILABLEorMAINTENANCEmode.- If the
CacheManagerisAVAILABLE, the operation is executed without lifecycle interactions. - If the
CacheManageris notAVAILABLEthen it attempts to go intoMAINTENANCE. Upon success, thedestroyCacheoperation is performed and thenMAINTENANCEmode is exited. On failure, an exception will be thrown and no destroy will have happened.
- Parameters:
alias- theCache's alias to destroy all persistent data from- Throws:
CachePersistenceException- when something goes wrong destroying the persistent data
- If the
-
-