K - the key type for the cacheV - the value type for the cachepublic interface UserManagedCache<K,V> extends Cache<K,V>, java.io.Closeable
Cache that is not managed by a CacheManager.
These caches must be closed in order to release all their resources.
Cache.Entry<K,V>| Modifier and Type | Method and Description |
|---|---|
void |
close()
Transitions this
UserManagedCache to UNINITIALIZED. |
Status |
getStatus()
Returns the current
Status of this UserManagedCache. |
void |
init()
Transitions this
UserManagedCache to AVAILABLE. |
clear, containsKey, get, getAll, getRuntimeConfiguration, iterator, put, putAll, putIfAbsent, remove, remove, removeAll, replace, replacevoid init() throws StateTransitionException
UserManagedCache to AVAILABLE.
If an error occurs before the UserManagedCache is AVAILABLE, it will revert to
UNINITIALIZED and attempt to properly release all resources.
java.lang.IllegalStateException - if the UserManagedCache is not UNINITIALIZEDStateTransitionException - if the UserManagedCache could not be made AVAILABLEvoid close()
throws StateTransitionException
UserManagedCache to UNINITIALIZED.
This will release all resources held by this cache.
Failure to release a resource will not prevent other resources from being released.
close in interface java.lang.AutoCloseableclose in interface java.io.CloseableStateTransitionException - if the UserManagedCache could not reach UNINITIALIZED cleanlyjava.lang.IllegalStateException - if the UserManagedCache is not AVAILABLE