public class LayeredEntityCache extends Object implements EntityCache
| Constructor and Description |
|---|
LayeredEntityCache(List<EntityCache> caches) |
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Evict all references from the cache.
|
boolean |
contains(Class<?> type,
Object key)
Check if a reference to an entity exists.
|
<T> T |
get(Class<T> type,
Object key)
Retrieve an existing entity if it exists in the cache.
|
void |
invalidate(Class<?> type)
Removes all references for the given type from the cache.
|
void |
invalidate(Class<?> type,
Object key)
Remove a reference to an entity from the cache.
|
<T> void |
put(Class<T> type,
Object key,
T value)
Put a reference to an entity.
|
public LayeredEntityCache(List<EntityCache> caches)
public <T> T get(Class<T> type, Object key)
EntityCacheget in interface EntityCacheT - entity typetype - entity classkey - entity keypublic <T> void put(Class<T> type, Object key, T value)
EntityCacheput in interface EntityCacheT - entity typetype - entity classkey - entity keyvalue - entity referencepublic boolean contains(Class<?> type, Object key)
EntityCachecontains in interface EntityCachetype - entity classkey - entity keypublic void invalidate(Class<?> type)
EntityCacheinvalidate in interface EntityCachetype - entity classpublic void invalidate(Class<?> type, Object key)
EntityCacheinvalidate in interface EntityCachetype - entity classkey - entity keypublic void clear()
EntityCacheclear in interface EntityCache