public interface EntityCache
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.
|
<T> T get(Class<T> type, Object key)
T
- entity typetype
- entity classkey
- entity key<T> void put(Class<T> type, Object key, T value)
T
- entity typetype
- entity classkey
- entity keyvalue
- entity referenceboolean contains(Class<?> type, Object key)
type
- entity classkey
- entity keyvoid invalidate(Class<?> type)
type
- entity classvoid invalidate(Class<?> type, Object key)
type
- entity classkey
- entity keyvoid clear()