Class ObjectCacheBackend

java.lang.Object
com.linkedin.davinci.store.cache.backend.ObjectCacheBackend

public class ObjectCacheBackend extends Object
This class is in charge of managing access and maintenance of a VeniceStoreCache. It makes available simple CRUD operations that can be performed on the cache
  • Constructor Details

    • ObjectCacheBackend

      public ObjectCacheBackend(ClientConfig clientConfig, ObjectCacheConfig cacheConfig, ReadOnlySchemaRepository schemaRepository)
      Parameters:
      clientConfig - configurations that enabled the VeniceStoreCacheBackend to interact with a venice cluster (to set up ingestion) as well as store information (such as the store name that is being cached).
      cacheConfig - configurations that configure the cache policy (TTL, size, etc.)
  • Method Details

    • close

      public void close()
    • clearCachedPartitions

      public void clearCachedPartitions(Version version)
    • get

      public <K, V> CompletableFuture<V> get(K key, Version version, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K,V> cacheLoader)
    • getAll

      public <K, V> CompletableFuture<Map<K,V>> getAll(Iterable<K> keys, Version version, Function<Iterable<K>,Map<K,V>> mappingFunction, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K,V> cacheLoader)
    • getStorageEngine

      public AbstractStorageEngine getStorageEngine(String topicName)
    • update

      public <K, V> void update(K key, V val, Version version, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K,V> cacheLoader)
    • getCacheInvalidatingStoreChangeListener

      public StoreDataChangedListener getCacheInvalidatingStoreChangeListener()
    • getStoreCacheConfig

      public ObjectCacheConfig getStoreCacheConfig()