public class SerializableAuthCache<K,V> extends AbstractFileSystemCache<K,V>
Efficient implementation of ApplicationCache for authorization sub-systems.
cache| Constructor and Description |
|---|
SerializableAuthCache() |
| Modifier and Type | Method and Description |
|---|---|
void |
evictFromCache(K key)
Removes the specified entry from the cache.
|
V |
getFromCache(K key)
Obtains a stored entry from the cache.
|
void |
putInCache(K key,
V entry)
Places an entry in the cache.
|
afterPropertiesSet, destroy, flush, initialize, setCacheDir, setCacheFilepublic V getFromCache(K key)
ApplicationCacheObtains a stored entry from the cache. Implementations must make sure not to throw an exception even if one occurs here.
key - the unique identifier to use for fetching the entry; be advised that the same
identifier must be used for saving the details into the cachepublic void putInCache(K key, V entry)
ApplicationCache
Places an entry in the cache. The key is the identifier used to subsequently
retrieve the entry.
key - the key corresponding to which entry must be stored in the cacheentry - the object entry to place into the cachepublic void evictFromCache(K key)
ApplicationCachekey is the identifier used to
remove the entry. If the entry is not found, the method should simply return (not throw an
exception).
Some cache implementations may not support eviction from the cache, in which case they should provide appropriate behavior to alter the token in either its documentation, via an exception, or through a log message.
key - the predefined key/identifier for evicting an entry from the cacheCopyright © 2015. All rights reserved.