Interface DaVinciClient<K,V>

Type Parameters:
K -
V -
All Superinterfaces:
AutoCloseable, AvroGenericStoreClient<K,V>, 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 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

      CompletableFuture<Void> subscribe(Set<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 calling AvroGenericStoreClient.close().
      Throws:
      a - VeniceException if cleanup failed for any of the partitions
    • unsubscribe

      void unsubscribe(Set<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 calling AvroGenericStoreClient.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