Interface CacheFactory
- All Known Implementing Classes:
CacheStrategy
public interface CacheFactory
Creates a level-one cache of server-side state.
- Author:
- Paul Ferraro
-
Method Summary
Modifier and TypeMethodDescription<K,V> Cache<K, V> createCache(Consumer<V> addTask, Consumer<V> removeTask) Creates a cache that invokes the specified tasks when an entry is added/removed.
-
Method Details
-
createCache
Creates a cache that invokes the specified tasks when an entry is added/removed.- Type Parameters:
K- the cache key typeV- the cache value type- Parameters:
addTask- the task invoked when a value is added to the cacheremoveTask- the task invoked when a value is removed from the cache- Returns:
- a new cache instance
-