Interface KeyRange<K extends Serializable>

  • Type Parameters:
    K - the type of key to assign for each partition.
    All Superinterfaces:
    Serializable
    All Known Implementing Classes:
    HashRange

    public interface KeyRange<K extends Serializable>
    extends Serializable
    Represents the key range of data partitions within a block.
    • Method Detail

      • isAll

        boolean isAll()
        Returns:
        whether this instance represents the entire range or not.
      • rangeBeginInclusive

        K rangeBeginInclusive()
        Returns:
        the beginning of this range (inclusive).
      • rangeEndExclusive

        K rangeEndExclusive()
        Returns:
        the end of this range (exclusive).
      • includes

        boolean includes​(K key)
        Parameters:
        key - the value to check
        Returns:
        true if this key range includes the specified value, false otherwise
      • toString

        String toString()
        This method should be overridden for a readable representation of KeyRange. The generic type K should override Object's toString() as well.
        Overrides:
        toString in class Object
      • equals

        boolean equals​(Object o)
        This method should be overridden for KeyRange comparisons.
        Overrides:
        equals in class Object
      • hashCode

        int hashCode()
        This method should be overridden for KeyRange comparisons.
        Overrides:
        hashCode in class Object