public interface CacheHandler
| Modifier and Type | Method and Description |
|---|---|
void |
apply(java.util.TreeMap<org.cyclos.impl.utils.cache.CacheType<? extends java.io.Serializable,? extends java.io.Serializable>,org.cyclos.impl.utils.cache.CacheOperation> operations)
Apply the given cache operations for each
CacheType. |
<K extends java.io.Serializable,V extends java.io.Serializable> |
getCache(org.cyclos.impl.utils.cache.CacheType<K,V> type)
Returns the
Cache implementation for the given type |
<K extends java.io.Serializable,V extends java.io.Serializable> |
getCacheIfInitialized(org.cyclos.impl.utils.cache.CacheType<K,V> type)
Returns the
Cache implementation for the given type if it has already been initialized, or null otherwise |
com.google.common.cache.Cache<java.lang.Object,java.lang.Object> |
getLocalCache()
The local cache is a general-purpose Guava cache that can be used to store data in a cluster will never be
distributed
|
<K extends java.io.Serializable,V extends java.io.Serializable> |
scheduleClear(org.cyclos.impl.utils.cache.CacheType<K,V> type)
Schedules a cache clear to be executed after the current transaction has been committed (important to prevent the
cache from being reloaded by
another thread before the current transaction is committed, populating the cache with a stale value)
|
<K extends java.io.Serializable,V extends java.io.Serializable> |
scheduleEvict(org.cyclos.impl.utils.cache.CacheType<K,V> type,
K key)
Schedules the eviction of an specific cache key after the current transaction has been committed (important to
prevent the cache from being
reloaded by another thread before the current transaction is committed, populating the cache with a stale value)
|
<K extends java.io.Serializable,V extends java.io.Serializable> |
scheduleEvict(org.cyclos.impl.utils.cache.CacheType<K,V> type,
java.util.Set<K> keys)
Schedules the eviction of the given cache keys after the current transaction has been committed (important to
prevent the cache from being
reloaded by another thread before the current transaction is committed, populating the cache with a stale value)
|
void apply(java.util.TreeMap<org.cyclos.impl.utils.cache.CacheType<? extends java.io.Serializable,? extends java.io.Serializable>,org.cyclos.impl.utils.cache.CacheOperation> operations)
CacheType.<K extends java.io.Serializable,V extends java.io.Serializable> org.cyclos.impl.utils.cache.Cache<K,V> getCache(org.cyclos.impl.utils.cache.CacheType<K,V> type)
Cache implementation for the given type<K extends java.io.Serializable,V extends java.io.Serializable> org.cyclos.impl.utils.cache.Cache<K,V> getCacheIfInitialized(org.cyclos.impl.utils.cache.CacheType<K,V> type)
Cache implementation for the given type if it has already been initialized, or null otherwisecom.google.common.cache.Cache<java.lang.Object,java.lang.Object> getLocalCache()
<K extends java.io.Serializable,V extends java.io.Serializable> void scheduleClear(org.cyclos.impl.utils.cache.CacheType<K,V> type)
<K extends java.io.Serializable,V extends java.io.Serializable> void scheduleEvict(org.cyclos.impl.utils.cache.CacheType<K,V> type,
K key)
<K extends java.io.Serializable,V extends java.io.Serializable> void scheduleEvict(org.cyclos.impl.utils.cache.CacheType<K,V> type,
java.util.Set<K> keys)