Package com.linkedin.davinci.client
Interface DaVinciClient<K,V>
- Type Parameters:
K-V-
- All Superinterfaces:
AutoCloseable,AvroGenericStoreClient<K,,V> Closeable
- All Known Subinterfaces:
SeekableDaVinciClient<K,V>
- All Known Implementing Classes:
AvroGenericDaVinciClient,AvroGenericSeekableDaVinciClient,AvroSpecificDaVinciClient,AvroSpecificSeekableDaVinciClient,DelegatingAvroGenericDaVinciClient,StatsAvroGenericDaVinciClient,StatsAvroSpecificDaVinciClient,VersionSpecificAvroGenericDaVinciClient
Da Vinci Client to provide key-value lookups in embedded mode
-
Method Summary
Modifier and TypeMethodDescriptionintGet partition count of a store.Ingest specific partition/partitions locally.Ingest the entire data (i.e.voidunsubscribe(Set<Integer> partitions) Stop ingesting a partition locally, and drop its associated local states/data.voidStop ingesting all subscribed partition locally, and drop their associated local states/data.Methods inherited from interface com.linkedin.venice.client.store.AvroGenericStoreClient
batchGet, close, compute, get, get, getKeySchema, getLatestValueSchema, getStoreName, start, streamingBatchGet, streamingBatchGet
-
Method Details
-
subscribeAll
CompletableFuture<Void> subscribeAll()Ingest the entire data (i.e. all partitions) locally.- Returns:
- a future which completes when the data is ready to serve
- Throws:
a- VeniceException if subscription failed for any of the partitions
-
subscribe
Ingest specific partition/partitions locally.- Parameters:
partitions- the set of partition IDs to subscribe to- Returns:
- a future which completes when the partitions are ready to serve
- Throws:
a- VeniceException if subscription failed for any of the partitions
-
unsubscribeAll
void unsubscribeAll()Stop ingesting all subscribed partition locally, and drop their associated local states/data. If applications intend to keep the states/data for future use, no need to invoke this function before callingAvroGenericStoreClient.close().- Throws:
VeniceException- if cleanup failed for any of the partitions
-
unsubscribe
Stop ingesting a partition locally, and drop its associated local states/data. If applications intend to keep the states/data for future use, no need to invoke this function before callingAvroGenericStoreClient.close().- Parameters:
partitions- the set of partition IDs to unsubscribe from- Throws:
VeniceException- if cleanup failed for any of the partitions
-
getPartitionCount
int getPartitionCount()Get partition count of a store.- Returns:
- partition count
-