public interface EntityCache
| Modifier and Type | Method and Description |
|---|---|
Boolean |
exists(Key<?> k)
Looks for a Key in the cache
|
void |
flush()
Clears the cache
|
<T> T |
getEntity(Key<T> k)
Returns the entity for a Key
|
<T> T |
getProxy(Key<T> k)
Returns a proxy for the entity for a Key
|
void |
notifyExists(Key<?> k,
boolean exists)
Notifies the cache of the existence of a Key
|
<T> void |
putEntity(Key<T> k,
T t)
Adds an entity to the cache
|
<T> void |
putProxy(Key<T> k,
T t)
Adds a proxy to the cache
|
EntityCacheStatistics |
stats() |
Boolean exists(Key<?> k)
k - the Key to search forvoid flush()
<T> T getEntity(Key<T> k)
T - the type of the entityk - the Key to search for<T> T getProxy(Key<T> k)
T - the type of the entityk - the Key to search forvoid notifyExists(Key<?> k, boolean exists)
k - the Keyexists - true if the Key represents an existing entity<T> void putEntity(Key<T> k, T t)
T - the type of the entityk - the Key of the entityt - the entity<T> void putProxy(Key<T> k, T t)
T - the type of the entityk - the Key of the entityt - the proxyEntityCacheStatistics stats()