public class SerializableAuthCache<V> extends AbstractFileSystemCache<V>
Efficient implementation of ApplicationCache for authorization sub-systems.
cache| Constructor and Description |
|---|
SerializableAuthCache(CacheType type) |
SerializableAuthCache(CacheType type,
String cacheDir,
String cacheFile) |
| Modifier and Type | Method and Description |
|---|---|
void |
evictFromCache(Object key)
Removes the specified entry from the cache.
|
V |
getFromCache(Object key)
Obtains a stored entry from the cache.
|
void |
putInCache(Object key,
V entry)
Places an entry in the cache.
|
afterPropertiesSet, destroy, flush, generate, initialize, setCacheDir, setCacheFile, setTtl, setTtlUnitpublic SerializableAuthCache(CacheType type)
public V getFromCache(Object 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(Object 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(Object 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.