Class IOContext

    • Field Detail

      • context

        public final IOContext.Context context
        An object of a enumerator Context type
      • mergeInfo

        public final MergeInfo mergeInfo
      • flushInfo

        public final FlushInfo flushInfo
      • readOnce

        public final boolean readOnce
        This flag indicates that the file will be opened, then fully read sequentially then closed.
      • randomAccess

        public final boolean randomAccess
        This flag indicates that the file will be accessed randomly. If this flag is set, then readOnce will be false.
      • load

        public final boolean load
        This flag is used for files that are a small fraction of the total index size and are expected to be heavily accessed in random-access fashion. Some Directory implementations may choose to load such files into physical memory (e.g. Java heap) as a way to provide stronger guarantees on query latency. If this flag is set, then randomAccess will be true.
      • DEFAULT

        public static final IOContext DEFAULT
      • READONCE

        public static final IOContext READONCE
        This context indicates that the file will be opened, then fully read sequentially then closed.

        The read operations will be performed in the same thread as the thread that opens the underlying storage.

      • RANDOM

        public static final IOContext RANDOM
    • Constructor Detail

      • IOContext

        public IOContext()
      • IOContext

        public IOContext​(FlushInfo flushInfo)
      • IOContext

        public IOContext​(MergeInfo mergeInfo)
      • IOContext

        public IOContext​(IOContext ctxt,
                         boolean readOnce)
        This constructor is used to initialize a IOContext instance with a new value for the readOnce variable. This automatically sets randomAccess and load to false.
        Parameters:
        ctxt - IOContext object whose information is used to create the new instance except the readOnce variable.
        readOnce - The new IOContext object will use this value for readOnce.