Package com.linkedin.davinci.client
Interface DaVinciClient<K,V>
-
- Type Parameters:
K
-V
-
- All Superinterfaces:
java.lang.AutoCloseable
,AvroGenericStoreClient<K,V>
,java.io.Closeable
- All Known Implementing Classes:
AvroGenericDaVinciClient
,AvroSpecificDaVinciClient
,DelegatingAvroGenericDaVinciClient
,StatsAvroGenericDaVinciClient
,StatsAvroSpecificDaVinciClient
public interface DaVinciClient<K,V> extends AvroGenericStoreClient<K,V>
Da Vinci Client to provide key-value lookups in embedded mode
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
getPartitionCount()
Get partition count of a store.java.util.concurrent.CompletableFuture<java.lang.Void>
subscribe(java.util.Set<java.lang.Integer> partitions)
Ingest specific partition/partitions locally.java.util.concurrent.CompletableFuture<java.lang.Void>
subscribeAll()
Ingest the entire data (i.e.void
unsubscribe(java.util.Set<java.lang.Integer> partitions)
Stop ingesting a partition locally, and drop its associated local states/data.void
unsubscribeAll()
Stop 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 Detail
-
subscribeAll
java.util.concurrent.CompletableFuture<java.lang.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
java.util.concurrent.CompletableFuture<java.lang.Void> subscribe(java.util.Set<java.lang.Integer> partitions)
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:
a
- VeniceException if cleanup failed for any of the partitions
-
unsubscribe
void unsubscribe(java.util.Set<java.lang.Integer> partitions)
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:
a
- VeniceException if cleanup failed for any of the partitions
-
getPartitionCount
int getPartitionCount()
Get partition count of a store.- Returns:
- partition count
-
-