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 Type
    Method
    Description
    <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

      <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.
      Type Parameters:
      K - the cache key type
      V - the cache value type
      Parameters:
      addTask - the task invoked when a value is added to the cache
      removeTask - the task invoked when a value is removed from the cache
      Returns:
      a new cache instance