Package org.ehcache
Interface PersistentCacheManager
- All Superinterfaces:
AutoCloseable,CacheManager,Closeable
A
CacheManager that knows how to lifecycle caches that can outlive the JVM.-
Method Summary
Modifier and TypeMethodDescriptionvoiddestroy()Destroys all persistent data associated with thisPersistentCacheManager.voiddestroyCache(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 Details
-
destroy
Destroys all persistent data associated with thisPersistentCacheManager.This is achieved by putting the
CacheManagerinMAINTENANCEmode, executing the destroy and then exiting theMAINTENANCEmode.- Throws:
IllegalStateException- if state maintenance couldn't be reachedCachePersistenceException- when something goes wrong destroying the persistent data
-
destroyCache
Destroys 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
-