Interface PartitionChunk<T>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      boolean abuts​(PartitionChunk<T> chunk)
      Determines if this PartitionChunk abuts another PartitionChunk.
      int getChunkNumber()
      Returns the partition chunk number of this PartitionChunk.
      T getObject()
      Returns the payload, generally an object that can be used to perform some action against the shard.
      boolean isEnd()
      Returns true if this chunk is the end of the partition.
      boolean isStart()
      Returns true if this chunk is the beginning of the partition.
    • Method Detail

      • getObject

        T getObject()
        Returns the payload, generally an object that can be used to perform some action against the shard.
        Returns:
        the payload
      • abuts

        boolean abuts​(PartitionChunk<T> chunk)
        Determines if this PartitionChunk abuts another PartitionChunk. A sequence of abutting PartitionChunks should start with an object where isStart() == true and eventually end with an object where isEnd() == true.
        Parameters:
        chunk - input chunk
        Returns:
        true if this chunk abuts the input chunk
      • isStart

        boolean isStart()
        Returns true if this chunk is the beginning of the partition. Most commonly, that means it represents the range [-infinity, X) for some concrete X.
        Returns:
        true if the chunk is the beginning of the partition
      • isEnd

        boolean isEnd()
        Returns true if this chunk is the end of the partition. Most commonly, that means it represents the range [X, infinity] for some concrete X.
        Returns:
        true if the chunk is the end of the partition
      • getChunkNumber

        int getChunkNumber()
        Returns the partition chunk number of this PartitionChunk. I.e. if there are 4 partitions in total and this is the 3rd partition, it will return 2
        Returns:
        the sequential numerical id of this partition chunk