Class ObjectCacheBackend
java.lang.Object
com.linkedin.davinci.store.cache.backend.ObjectCacheBackend
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 Summary
ConstructorDescriptionObjectCacheBackend
(ClientConfig clientConfig, ObjectCacheConfig cacheConfig, ReadOnlySchemaRepository schemaRepository) -
Method Summary
Modifier and TypeMethodDescriptionvoid
clearCachedPartitions
(Version version) void
close()
<K,
V> CompletableFuture<V> <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
(String topicName) <K,
V> void update
(K key, V val, Version version, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K, V> cacheLoader)
-
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
-
get
public <K,V> CompletableFuture<V> get(K key, Version version, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K, V> cacheLoader) -
getAll
-
getStorageEngine
-
update
public <K,V> void update(K key, V val, Version version, com.github.benmanes.caffeine.cache.AsyncCacheLoader<K, V> cacheLoader) -
getCacheInvalidatingStoreChangeListener
-
getStoreCacheConfig
-