Class CheckpointEntry.GroupState

    • Method Detail

      • addPartitionCounter

        public void addPartitionCounter​(int partId,
                                        long cntr)
        Parameters:
        partId - Partition ID to add.
        cntr - Partition counter.
      • counterByPartition

        public long counterByPartition​(int partId)
        Gets partition counter by partition ID.
        Parameters:
        partId - Partition ID.
        Returns:
        Partition update counter (will return -1 if partition is not present in the record).
      • getPartitionByIndex

        public int getPartitionByIndex​(int idx)
        Return a partition id by an index of this group state. Index was passed through parameter have to be less than size.
        Parameters:
        idx - Partition index.
        Returns:
        Patition id.
      • size

        public int size()
        Return size of this group state.
        Returns:
        Size of an internal indexes array fro this group state.
      • indexByPartition

        public int indexByPartition​(int partId)
        Parameters:
        partId - Partition ID to search.
        Returns:
        Non-negative index of partition if found or negative value if not found.