public class DefaultEntityCache extends Object implements EntityCache
| Constructor and Description |
|---|
DefaultEntityCache() |
| 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() |
public Boolean exists(Key<?> k)
EntityCacheexists in interface EntityCachek - the Key to search forpublic void flush()
EntityCacheflush in interface EntityCachepublic <T> T getEntity(Key<T> k)
EntityCachegetEntity in interface EntityCacheT - the type of the entityk - the Key to search forpublic <T> T getProxy(Key<T> k)
EntityCachegetProxy in interface EntityCacheT - the type of the entityk - the Key to search forpublic void notifyExists(Key<?> k, boolean exists)
EntityCachenotifyExists in interface EntityCachek - the Keyexists - true if the Key represents an existing entitypublic <T> void putEntity(Key<T> k, T t)
EntityCacheputEntity in interface EntityCacheT - the type of the entityk - the Key of the entityt - the entitypublic <T> void putProxy(Key<T> k, T t)
EntityCacheputProxy in interface EntityCacheT - the type of the entityk - the Key of the entityt - the proxypublic EntityCacheStatistics stats()
stats in interface EntityCache