Class RecordId

  • All Implemented Interfaces:
    java.lang.Comparable<RecordId>

    public final class RecordId
    extends java.lang.Object
    implements java.lang.Comparable<RecordId>
    The record id. This includes the segment id and the offset within the segment.
    • Field Detail

      • NULL

        public static final RecordId NULL
        A null record id not identifying any record.
      • EMPTY_ARRAY

        public static RecordId[] EMPTY_ARRAY
    • Constructor Detail

      • RecordId

        public RecordId​(SegmentId segmentId,
                        int offset)
    • Method Detail

      • getSegmentId

        public SegmentId getSegmentId()
      • getRecordNumber

        public int getRecordNumber()
      • asUUID

        public java.util.UUID asUUID()
        Returns:
        the segment id part of this record id as UUID
      • getSegment

        @NotNull
        public @NotNull Segment getSegment()
      • compareTo

        public int compareTo​(@NotNull
                             @NotNull RecordId that)
        Specified by:
        compareTo in interface java.lang.Comparable<RecordId>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • toString10

        public java.lang.String toString10()
        Returns the record id string representation used in Oak 1.0.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object object)
        Overrides:
        equals in class java.lang.Object
      • estimateMemoryUsage

        public int estimateMemoryUsage()