public class EmptyEntityCache extends Object implements EntityCache
Constructor and Description |
---|
EmptyEntityCache() |
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 <T> T get(Class<T> type, Object key)
EntityCache
get
in interface EntityCache
T
- entity typetype
- entity classkey
- entity keypublic <T> void put(Class<T> type, Object key, T value)
EntityCache
put
in interface EntityCache
T
- entity typetype
- entity classkey
- entity keyvalue
- entity referencepublic boolean contains(Class<?> type, Object key)
EntityCache
contains
in interface EntityCache
type
- entity classkey
- entity keypublic void invalidate(Class<?> type)
EntityCache
invalidate
in interface EntityCache
type
- entity classpublic void invalidate(Class<?> type, Object key)
EntityCache
invalidate
in interface EntityCache
type
- entity classkey
- entity keypublic void clear()
EntityCache
clear
in interface EntityCache