Package com.linkedin.davinci.store.cache
Class VeniceStoreCacheStoragePartition
java.lang.Object
com.linkedin.davinci.store.AbstractStoragePartition
com.linkedin.davinci.store.cache.VeniceStoreCacheStoragePartition
- 
Field SummaryFields inherited from class com.linkedin.davinci.store.AbstractStoragePartitionpartitionId
- 
Constructor SummaryConstructorsConstructorDescriptionVeniceStoreCacheStoragePartition(Integer partitionId, ObjectCacheConfig cacheConfig, RecordDeserializer keyRecordDeserializer, com.github.benmanes.caffeine.cache.AsyncCacheLoader cacheLoader) VeniceStoreCacheStoragePartition(Integer partitionId, ObjectCacheConfig cacheConfig, org.apache.avro.Schema keySchema, com.github.benmanes.caffeine.cache.AsyncCacheLoader cacheLoader) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidCleans up the snapshotvoidclose()Close the specific partitionvoidCreates a snapshot of the current state of the storage if the blob transfer feature is enabled via the store configurationvoiddelete(byte[] key) Delete a key from the partition databasevoiddrop()Drop when it is not required anymore.byte[]get(byte[] key) Get a value from the partition databasebyte[]get(ByteBuffer key) <K,V> V get(K key) Get a Value from the partition databasevoidgetByKeyPrefix(byte[] keyPrefix, BytesStreamingCallback callback) Populate provided callback with key-value pairs from the partition database where the keys have provided prefix.longGet the partition database size in bytesvoidput(byte[] key, byte[] value) Puts a value into the partition databasevoidput(byte[] key, ByteBuffer value) <K,V> void put(K key, V value) sync()Sync current database.booleanverifyConfig(StoragePartitionConfig storagePartitionConfig) Check whether current storage partition verifyConfig the given partition configMethods inherited from class com.linkedin.davinci.store.AbstractStoragePartitionbeginBatchWrite, checkDatabaseIntegrity, deleteWithReplicationMetadata, endBatchWrite, get, getIterator, getPartitionId, getReplicationMetadata, getRmdByteUsage, putReplicationMetadata, putWithReplicationMetadata, putWithReplicationMetadata, reopen, validateBatchIngestion
- 
Constructor Details- 
VeniceStoreCacheStoragePartitionpublic VeniceStoreCacheStoragePartition(Integer partitionId, ObjectCacheConfig cacheConfig, org.apache.avro.Schema keySchema, com.github.benmanes.caffeine.cache.AsyncCacheLoader cacheLoader) 
- 
VeniceStoreCacheStoragePartitionpublic VeniceStoreCacheStoragePartition(Integer partitionId, ObjectCacheConfig cacheConfig, RecordDeserializer keyRecordDeserializer, com.github.benmanes.caffeine.cache.AsyncCacheLoader cacheLoader) 
 
- 
- 
Method Details- 
putpublic void put(byte[] key, byte[] value) Description copied from class:AbstractStoragePartitionPuts a value into the partition database- Specified by:
- putin class- AbstractStoragePartition
 
- 
put- Specified by:
- putin class- AbstractStoragePartition
 
- 
putpublic <K,V> void put(K key, V value) - Specified by:
- putin class- AbstractStoragePartition
 
- 
getpublic byte[] get(byte[] key) Description copied from class:AbstractStoragePartitionGet a value from the partition database- Specified by:
- getin class- AbstractStoragePartition
- Parameters:
- key- key to be retrieved
- Returns:
- null if the key does not exist, byte[] value if it exists.
 
- 
getpublic <K,V> V get(K key) Description copied from class:AbstractStoragePartitionGet a Value from the partition database- Specified by:
- getin class- AbstractStoragePartition
- Type Parameters:
- K- the type for Key
- V- the type for the return value
- Parameters:
- key- key to be retrieved
- Returns:
- null if the key does not exist, V value if it exists
 
- 
get- Specified by:
- getin class- AbstractStoragePartition
 
- 
getByKeyPrefixDescription copied from class:AbstractStoragePartitionPopulate provided callback with key-value pairs from the partition database where the keys have provided prefix. If prefix is null, callback will be populated will all key-value pairs from the partition database.- Specified by:
- getByKeyPrefixin class- AbstractStoragePartition
 
- 
deletepublic void delete(byte[] key) Description copied from class:AbstractStoragePartitionDelete a key from the partition database- Specified by:
- deletein class- AbstractStoragePartition
 
- 
syncDescription copied from class:AbstractStoragePartitionSync current database.- Specified by:
- syncin class- AbstractStoragePartition
- Returns:
- Database related info, which is required to be checkpointed.
 
- 
droppublic void drop()Description copied from class:AbstractStoragePartitionDrop when it is not required anymore.- Specified by:
- dropin class- AbstractStoragePartition
 
- 
closepublic void close()Description copied from class:AbstractStoragePartitionClose the specific partition- Specified by:
- closein class- AbstractStoragePartition
 
- 
verifyConfigDescription copied from class:AbstractStoragePartitionCheck whether current storage partition verifyConfig the given partition config- Specified by:
- verifyConfigin class- AbstractStoragePartition
- Returns:
 
- 
getPartitionSizeInBytespublic long getPartitionSizeInBytes()Description copied from class:AbstractStoragePartitionGet the partition database size in bytes- Specified by:
- getPartitionSizeInBytesin class- AbstractStoragePartition
- Returns:
- partition database size
 
- 
getVeniceCache
- 
createSnapshotpublic void createSnapshot()Description copied from class:AbstractStoragePartitionCreates a snapshot of the current state of the storage if the blob transfer feature is enabled via the store configuration- Specified by:
- createSnapshotin class- AbstractStoragePartition
 
- 
cleanupSnapshotpublic void cleanupSnapshot()Description copied from class:AbstractStoragePartitionCleans up the snapshot- Specified by:
- cleanupSnapshotin class- AbstractStoragePartition
 
 
-