Interface AsyncPartitionFinder<K>


public interface AsyncPartitionFinder<K>
Created by acurtis on 1/26/18.
  • Method Details

    • findPartitionName

      @Nonnull CompletionStage<String> findPartitionName(@Nonnull String resourceName, @Nonnull K partitionKey)
      Returns the name of partition for the given key within the given table.
      Parameters:
      resourceName - name of the database
      partitionKey - partition key field for the data
      Returns:
      name of the partition
      Throws:
      RouterException - if there was an error
    • findPartitionName

      @Nonnull default CompletionStage<String> findPartitionName(@Nonnull Pair<String,K> resource)
    • getAllPartitionNames

      @Nonnull CompletionStage<List<String>> getAllPartitionNames(@Nonnull String resourceName)
    • getNumPartitions

      CompletionStage<Integer> getNumPartitions(@Nonnull String resourceName)
      Returns the number of partitions for a given db
      Parameters:
      resourceName - name of the database
    • findPartitionNumber

      CompletionStage<Integer> findPartitionNumber(K partitionKey, int numPartitions, String storeName, int versionNumber)
      Venice-specific API for finding the partition number without the added overhead of parsing a partition name.
    • adapt

      static <K> AsyncPartitionFinder<K> adapt(PartitionFinder<K> partitionFinder, Executor executor)