Class AbstractBlockPackedReader

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, LongArray

    @NotThreadSafe
    public abstract class AbstractBlockPackedReader
    extends java.lang.Object
    implements LongArray
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract long blockOffsetAt​(int block)  
      long get​(long valueIndex)
      Get value at idx.
      long indexOf​(long value)
      Using the given value returns the first index corresponding to the value.
      long length()
      Get array length.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface org.apache.cassandra.index.sai.disk.v1.LongArray

        close
    • Method Detail

      • blockOffsetAt

        protected abstract long blockOffsetAt​(int block)
      • get

        public long get​(long valueIndex)
        Description copied from interface: LongArray
        Get value at idx.
        Specified by:
        get in interface LongArray
      • length

        public long length()
        Description copied from interface: LongArray
        Get array length.
        Specified by:
        length in interface LongArray
      • indexOf

        public long indexOf​(long value)
        Description copied from interface: LongArray
        Using the given value returns the first index corresponding to the value.
        Specified by:
        indexOf in interface LongArray
        Parameters:
        value - Value to lookup, and it must not be smaller than previous value
        Returns:
        The index of the given value or negative value if target value is greater than all values