Class HashCodePartitionFunction

    • Constructor Detail

      • HashCodePartitionFunction

        public HashCodePartitionFunction​(int numPartitions)
    • Method Detail

      • getPartition

        public int getPartition​(Object value)
        Description copied from interface: PartitionFunction
        Method to compute and return partition id for the given value.
        Specified by:
        getPartition in interface PartitionFunction
        Parameters:
        value - Value for which to determine the partition id.
        Returns:
        partition id for the value.
      • getNumPartitions

        public int getNumPartitions()
        Description copied from interface: PartitionFunction
        Returns the total number of possible partitions.
        Specified by:
        getNumPartitions in interface PartitionFunction
        Returns:
        Number of possible partitions.