Package org.apache.lucene.store
Class IOContext
- java.lang.Object
-
- org.apache.lucene.store.IOContext
-
public class IOContext extends Object
IOContext holds additional details on the merge/search context. A IOContext object can never be initialized as null as passed as a parameter to eitherDirectory.openInput(String, IOContext)
orDirectory.createOutput(String, IOContext)
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
IOContext.Context
Context is a enumerator which specifies the context in which the Directory is being used for.
-
Field Summary
Fields Modifier and Type Field Description IOContext.Context
context
An object of a enumerator Context typestatic IOContext
DEFAULT
FlushInfo
flushInfo
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.static IOContext
LOAD
MergeInfo
mergeInfo
static IOContext
READ
boolean
readOnce
This flag indicates that the file will be opened, then fully read sequentially then closed.static IOContext
READONCE
-
Constructor Summary
Constructors Constructor Description IOContext()
IOContext(FlushInfo flushInfo)
IOContext(IOContext.Context context)
IOContext(IOContext ctxt, boolean readOnce)
This constructor is used to initialize aIOContext
instance with a new value for the readOnce variable.IOContext(MergeInfo mergeInfo)
-
-
-
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.
-
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. SomeDirectory
implementations may choose to load such files into physical memory (e.g. Java heap) as a way to provide stronger guarantees on query latency.
-
DEFAULT
public static final IOContext DEFAULT
-
READONCE
public static final IOContext READONCE
-
READ
public static final IOContext READ
-
LOAD
public static final IOContext LOAD
-
-
Constructor Detail
-
IOContext
public IOContext()
-
IOContext
public IOContext(FlushInfo flushInfo)
-
IOContext
public IOContext(IOContext.Context context)
-
IOContext
public IOContext(MergeInfo mergeInfo)
-
-