Class SegmentPropertyState

  • All Implemented Interfaces:
    org.apache.jackrabbit.oak.api.PropertyState

    public class SegmentPropertyState
    extends Object
    implements org.apache.jackrabbit.oak.api.PropertyState
    A property, which can read a value or list record from a segment. It currently doesn't cache data.

    Depending on the property type, this is a record of type "VALUE" or a record of type "LIST" (for arrays).

    • Method Detail

      • getName

        @NotNull
        public @NotNull String getName()
        Specified by:
        getName in interface org.apache.jackrabbit.oak.api.PropertyState
      • getType

        @NotNull
        public @NotNull org.apache.jackrabbit.oak.api.Type<?> getType()
        Specified by:
        getType in interface org.apache.jackrabbit.oak.api.PropertyState
      • isArray

        public boolean isArray()
        Specified by:
        isArray in interface org.apache.jackrabbit.oak.api.PropertyState
      • count

        public int count()
        Specified by:
        count in interface org.apache.jackrabbit.oak.api.PropertyState
      • getValue

        @NotNull
        public <T> T getValue​(org.apache.jackrabbit.oak.api.Type<T> type)
        Specified by:
        getValue in interface org.apache.jackrabbit.oak.api.PropertyState
      • size

        public long size()
        Specified by:
        size in interface org.apache.jackrabbit.oak.api.PropertyState
      • getValue

        @NotNull
        public <T> T getValue​(org.apache.jackrabbit.oak.api.Type<T> type,
                              int index)
        Specified by:
        getValue in interface org.apache.jackrabbit.oak.api.PropertyState
      • size

        public long size​(int index)
        Specified by:
        size in interface org.apache.jackrabbit.oak.api.PropertyState
      • equals

        public boolean equals​(Object object)
      • hashCode

        public int hashCode()
      • 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