Class MapRecord


  • public class MapRecord
    extends Object
    A map. The top level record is either a record of type "BRANCH" or "LEAF" (depending on the data).
    • Field Detail

      • BITS_PER_LEVEL

        protected static final int BITS_PER_LEVEL
        Number of bits of the hash code to look at on each level of the trie.
        See Also:
        Constant Field Values
      • BUCKETS_PER_LEVEL

        protected static final int BUCKETS_PER_LEVEL
        Number of buckets at each level of the trie.
        See Also:
        Constant Field Values
      • MAX_NUMBER_OF_LEVELS

        protected static final int MAX_NUMBER_OF_LEVELS
        Maximum number of trie levels.
        See Also:
        Constant Field Values
      • LEVEL_BITS

        protected static final int LEVEL_BITS
        Number of bits needed to indicate the current trie level. Currently 4.
      • SIZE_BITS

        protected static final int SIZE_BITS
        Number of bits used to indicate the size of a map. Currently 28.
      • MAX_SIZE

        protected static final int MAX_SIZE
        Maximum size of a map.
      • WARN_SIZE

        protected static final int WARN_SIZE
        Going over this limit will generate a warning message in the log
        See Also:
        Constant Field Values
      • ERROR_SIZE

        protected static final int ERROR_SIZE
        Going over this limit will generate an error message in the log
        See Also:
        Constant Field Values
      • ERROR_SIZE_DISCARD_WRITES

        protected static final int ERROR_SIZE_DISCARD_WRITES
        Going over this limit will generate an error message in the log and won't allow writes unless oak.segmentNodeStore.allowWritesOnHugeMapRecord system property is set.
        See Also:
        Constant Field Values
      • ERROR_SIZE_HARD_STOP

        protected static final int ERROR_SIZE_HARD_STOP
        Going over this limit will generate an error message in the log and won't allow any writes whatsoever. Moreover UnsupportedOperationException will be thrown.
        See Also:
        Constant Field Values
    • Method Detail

      • isDiff

        public boolean isDiff()
      • toString

        public String toString()
      • getSegment

        protected Segment getSegment()
        Returns the segment that contains this record.
        Returns:
        segment that contains this record
      • getRecordNumber

        protected int getRecordNumber()
      • getRecordId

        public RecordId getRecordId()
        Returns the identifier of this record.
        Returns:
        record identifier
      • getGcGeneration

        @NotNull
        public @NotNull GCGeneration getGcGeneration()
        Get the underlying segment's gc generation. Might cause the segment to get loaded if the generation info is missing
        Returns:
        the segment's gc generation
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object