Class BlockInfo

  • All Implemented Interfaces:
    IOReadableWritable

    @Public
    public class BlockInfo
    extends Object
    implements IOReadableWritable
    A block of 24 bytes written at the end of a block in a binary file, and containing i) the number of records in the block, ii) the accumulated number of records, and iii) the offset of the first record in the block.
    • Constructor Detail

      • BlockInfo

        public BlockInfo()
    • Method Detail

      • getInfoSize

        public int getInfoSize()
      • getFirstRecordStart

        public long getFirstRecordStart()
        Returns the firstRecordStart.
        Returns:
        the firstRecordStart
      • setFirstRecordStart

        public void setFirstRecordStart​(long firstRecordStart)
        Sets the firstRecordStart to the specified value.
        Parameters:
        firstRecordStart - the firstRecordStart to set
      • read

        public void read​(DataInputView in)
                  throws IOException
        Description copied from interface: IOReadableWritable
        Reads the object's internal data from the given data input view.
        Specified by:
        read in interface IOReadableWritable
        Parameters:
        in - the input view to read the data from
        Throws:
        IOException - thrown if any error occurs while reading from the input stream
      • getRecordCount

        public long getRecordCount()
        Returns the recordCount.
        Returns:
        the recordCount
      • getAccumulatedRecordCount

        public long getAccumulatedRecordCount()
        Returns the accumulated record count.
        Returns:
        the accumulated record count
      • setAccumulatedRecordCount

        public void setAccumulatedRecordCount​(long accumulatedRecordCount)
        Sets the accumulatedRecordCount to the specified value.
        Parameters:
        accumulatedRecordCount - the accumulatedRecordCount to set
      • setRecordCount

        public void setRecordCount​(long recordCount)
        Sets the recordCount to the specified value.
        Parameters:
        recordCount - the recordCount to set