Package com.rpl.rama

Interface Depot.Partitioning<T>

Type Parameters:
T - Type of data being appended to depot
All Superinterfaces:
RamaSerializable, Serializable
Enclosing interface:
Depot

public static interface Depot.Partitioning<T> extends RamaSerializable
Interface for implementing custom depot partitioners
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    choosePartitionIndex(T data, int numPartitions)
    Computes partition number for append based on data and number of partitions in depot
  • Method Details

    • choosePartitionIndex

      int choosePartitionIndex(T data, int numPartitions)
      Computes partition number for append based on data and number of partitions in depot
      Parameters:
      data - Data being appended
      numPartitions - Number of partitions of depot
      Returns:
      Partition number to append to between 0 and numPartitions