Class OnDiskIndex

  • All Implemented Interfaces:
    java.io.Closeable, java.lang.AutoCloseable, java.lang.Iterable<OnDiskIndex.DataTerm>

    public class OnDiskIndex
    extends java.lang.Object
    implements java.lang.Iterable<OnDiskIndex.DataTerm>, java.io.Closeable
    • Field Detail

      • indexSize

        protected final long indexSize
      • hasMarkedPartials

        protected final boolean hasMarkedPartials
      • keyFetcher

        protected final com.google.common.base.Function<java.lang.Long,​DecoratedKey> keyFetcher
      • indexPath

        protected final java.lang.String indexPath
      • minTerm

        protected final java.nio.ByteBuffer minTerm
      • maxTerm

        protected final java.nio.ByteBuffer maxTerm
      • minKey

        protected final java.nio.ByteBuffer minKey
      • maxKey

        protected final java.nio.ByteBuffer maxKey
    • Constructor Detail

      • OnDiskIndex

        public OnDiskIndex​(File index,
                           AbstractType<?> cmp,
                           com.google.common.base.Function<java.lang.Long,​DecoratedKey> keyReader)
    • Method Detail

      • hasMarkedPartials

        public boolean hasMarkedPartials()
      • minTerm

        public java.nio.ByteBuffer minTerm()
      • maxTerm

        public java.nio.ByteBuffer maxTerm()
      • minKey

        public java.nio.ByteBuffer minKey()
      • maxKey

        public java.nio.ByteBuffer maxKey()
      • search

        public RangeIterator<java.lang.Long,​Token> search​(Expression exp)
        Search for rows which match all of the terms inside the given expression in the index file.
        Parameters:
        exp - The expression to use for the query.
        Returns:
        Iterator which contains rows for all of the terms from the given range.
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException
      • getIndexPath

        public java.lang.String getIndexPath()