Record Class PageEncodingStats

java.lang.Object
java.lang.Record
dev.hardwood.metadata.PageEncodingStats
Record Components:
pageType - the kind of page counted
encoding - the encoding those pages were written with
count - the number of pages written with this page type and encoding

public record PageEncodingStats(PageType pageType, Encoding encoding, int count) extends Record

The number of pages a writer produced for one combination of page type and encoding within a column chunk.

A chunk's full set of these is available from ColumnMetaData.encodingStats(); the field is optional in the format, so it may be absent. When present it is complete: the counts account for every page in the chunk. A file that encodes the field in some other way than the format defines reads as absent rather than as a partial list.

See Also:
  • Constructor Details

    • PageEncodingStats

      public PageEncodingStats(PageType pageType, Encoding encoding, int count)
      Creates an instance of a PageEncodingStats record class.
      Parameters:
      pageType - the value for the pageType record component
      encoding - the value for the encoding record component
      count - the value for the count record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • pageType

      public PageType pageType()
      Returns the value of the pageType record component.
      Returns:
      the value of the pageType record component
    • encoding

      public Encoding encoding()
      Returns the value of the encoding record component.
      Returns:
      the value of the encoding record component
    • count

      public int count()
      Returns the value of the count record component.
      Returns:
      the value of the count record component