public interface ResourceDataCache
Modifier and Type | Method and Description |
---|---|
void |
clear()
Remove all mappings from the cache.
|
void |
evictData(Object key)
Evict the mapping for this
key from this cache if it is present. |
Object |
getData(Object key)
Finds a cached data object for a
Resource representation from the underlying cache store
by the given key . |
void |
putData(Object key,
Object data)
Associates the specified cacheable
data object for a Resource representation with the specified
key in the underlying cache store. |
Object |
putDataIfAbsent(Object key,
Object data)
Associates the specified cacheable
data object for a Resource representation with the specified
key in the underlying cache store if it is not set already. |
Object getData(Object key)
Resource
representation from the underlying cache store
by the given key
.key
- cache keyResource
representation from the underlying cache store by the
given key
void putData(Object key, Object data)
data
object for a Resource
representation with the specified
key
in the underlying cache store.
If the cache previously contained a mapping for this key, the old cache data object is replaced by the
specified cacheable data
object.
key
- cache keydata
- cacheable data
object for a Resource
representationObject putDataIfAbsent(Object key, Object data)
data
object for a Resource
representation with the specified
key
in the underlying cache store if it is not set already.
If the cache previously contained a mapping for this key, the existing cache data object is not going
to be replaced by the specified cacheable data
object, but the existing cache data object will be
simply returned without replacement. If there was no mapping for this key, then it should return null
instead.
key
- cache keydata
- cacheable data
object for a Resource
representationdata
object, but the existing cache data
object will be simply returned without replacement. If there was no mapping for this key, then it
should return null
instead.void evictData(Object key)
key
from this cache if it is present.key
- cache keyvoid clear()
Copyright © 2017–2020 Hippo B.V. (http://www.onehippo.com). All rights reserved.