# Uses of Record Class
org.apache.lucene.store.IOContext

Packages that use IOContext
Package
Description
org.apache.lucene.codecs
Codecs API: API for customization of the encoding and structure of the index.
org.apache.lucene.codecs.lucene90
Lucene 9.0 file format.
org.apache.lucene.codecs.lucene90.compressing
Lucene 9.0 compressing format.
org.apache.lucene.codecs.lucene94
Lucene 9.4 file format.
org.apache.lucene.codecs.lucene99
Lucene 9.9 file format.
org.apache.lucene.index
Code to maintain and access indices.
org.apache.lucene.store
Binary i/o API, used for all index data.

## Uses of IOContext in org.apache.lucene.codecs

Methods in org.apache.lucene.codecs with parameters of type IOContext
Modifier and Type
Method
Description
`final IndexOutput`
CompoundDirectory.`createOutput(String name, IOContext context)`
`final IndexOutput`
CompoundDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`abstract StoredFieldsReader`
StoredFieldsFormat.`fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)`
Returns a `StoredFieldsReader` to load stored fields.
`abstract StoredFieldsWriter`
StoredFieldsFormat.`fieldsWriter(Directory directory, SegmentInfo si, IOContext context)`
Returns a `StoredFieldsWriter` to write stored fields.
`abstract CompoundDirectory`
CompoundFormat.`getCompoundReader(Directory dir, SegmentInfo si, IOContext context)`
Returns a Directory view (read-only) for the compound files in this segment
`abstract FieldInfos`
FieldInfosFormat.`read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext iocontext)`
Read the `FieldInfos` previously written with `FieldInfosFormat.write(org.apache.lucene.store.Directory, org.apache.lucene.index.SegmentInfo, java.lang.String, org.apache.lucene.index.FieldInfos, org.apache.lucene.store.IOContext)`.
`abstract SegmentInfo`
SegmentInfoFormat.`read(Directory directory, String segmentName, byte[] segmentID, IOContext context)`
Read `SegmentInfo` data from a directory.
`abstract Bits`
LiveDocsFormat.`readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)`
Read live docs bits.
`abstract TermVectorsReader`
TermVectorsFormat.`vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)`
Returns a `TermVectorsReader` to read term vectors.
`abstract TermVectorsWriter`
TermVectorsFormat.`vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)`
Returns a `TermVectorsWriter` to write term vectors.
`abstract void`
CompoundFormat.`write(Directory dir, SegmentInfo si, IOContext context)`
Packs the provided segment's files into a compound format.
`abstract void`
FieldInfosFormat.`write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context)`
Writes the provided `FieldInfos` to the directory.
`abstract void`
SegmentInfoFormat.`write(Directory dir, SegmentInfo info, IOContext ioContext)`
Write `SegmentInfo` data.
`abstract void`
LiveDocsFormat.`writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context)`
Persist live docs bits.

## Uses of IOContext in org.apache.lucene.codecs.lucene90

Methods in org.apache.lucene.codecs.lucene90 with parameters of type IOContext
Modifier and Type
Method
Description
`StoredFieldsReader`
Lucene90StoredFieldsFormat.`fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)`
`StoredFieldsWriter`
Lucene90StoredFieldsFormat.`fieldsWriter(Directory directory, SegmentInfo si, IOContext context)`
`CompoundDirectory`
Lucene90CompoundFormat.`getCompoundReader(Directory dir, SegmentInfo si, IOContext context)`
`Bits`
Lucene90LiveDocsFormat.`readLiveDocs(Directory dir, SegmentCommitInfo info, IOContext context)`
`void`
Lucene90CompoundFormat.`write(Directory dir, SegmentInfo si, IOContext context)`
`void`
Lucene90LiveDocsFormat.`writeLiveDocs(Bits bits, Directory dir, SegmentCommitInfo info, int newDelCount, IOContext context)`

## Uses of IOContext in org.apache.lucene.codecs.lucene90.compressing

Methods in org.apache.lucene.codecs.lucene90.compressing with parameters of type IOContext
Modifier and Type
Method
Description
`StoredFieldsReader`
Lucene90CompressingStoredFieldsFormat.`fieldsReader(Directory directory, SegmentInfo si, FieldInfos fn, IOContext context)`
`StoredFieldsWriter`
Lucene90CompressingStoredFieldsFormat.`fieldsWriter(Directory directory, SegmentInfo si, IOContext context)`
`final TermVectorsReader`
Lucene90CompressingTermVectorsFormat.`vectorsReader(Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, IOContext context)`
`final TermVectorsWriter`
Lucene90CompressingTermVectorsFormat.`vectorsWriter(Directory directory, SegmentInfo segmentInfo, IOContext context)`
Constructors in org.apache.lucene.codecs.lucene90.compressing with parameters of type IOContext
Modifier
Constructor
Description
``
`Lucene90CompressingStoredFieldsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)`
Sole constructor.
``
`Lucene90CompressingTermVectorsReader(Directory d, SegmentInfo si, String segmentSuffix, FieldInfos fn, IOContext context, String formatName, CompressionMode compressionMode)`
Sole constructor.

## Uses of IOContext in org.apache.lucene.codecs.lucene94

Methods in org.apache.lucene.codecs.lucene94 with parameters of type IOContext
Modifier and Type
Method
Description
`FieldInfos`
Lucene94FieldInfosFormat.`read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context)`
`void`
Lucene94FieldInfosFormat.`write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context)`

## Uses of IOContext in org.apache.lucene.codecs.lucene99

Methods in org.apache.lucene.codecs.lucene99 with parameters of type IOContext
Modifier and Type
Method
Description
`SegmentInfo`
Lucene99SegmentInfoFormat.`read(Directory dir, String segment, byte[] segmentID, IOContext context)`
`void`
Lucene99SegmentInfoFormat.`write(Directory dir, SegmentInfo si, IOContext ioContext)`

## Uses of IOContext in org.apache.lucene.index

Fields in org.apache.lucene.index declared as IOContext
Modifier and Type
Field
Description
`final IOContext`
SegmentReadState.`context`
`IOContext` to pass to `Directory.openInput(String,IOContext)`.
`final IOContext`
SegmentWriteState.`context`
`IOContext` for all writes; you should pass this to `Directory.createOutput(String,IOContext)`.
Constructors in org.apache.lucene.index with parameters of type IOContext
Modifier
Constructor
Description
``
`SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context)`
Create a `SegmentReadState`.
``
`SegmentReadState(Directory dir, SegmentInfo info, FieldInfos fieldInfos, IOContext context, String segmentSuffix)`
Create a `SegmentReadState`.
``
`SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context)`
Sole constructor.
``
`SegmentWriteState(InfoStream infoStream, Directory directory, SegmentInfo segmentInfo, FieldInfos fieldInfos, org.apache.lucene.index.BufferedUpdates segUpdates, IOContext context, String segmentSuffix)`
Constructor which takes segment suffix.

## Uses of IOContext in org.apache.lucene.store

Fields in org.apache.lucene.store declared as IOContext
Modifier and Type
Field
Description
`static final IOContext`
IOContext.`DEFAULT`
A default context for normal reads/writes.
`static final IOContext`
IOContext.`READONCE`
A default context for reads with `ReadAdvice.SEQUENTIAL`.
Fields in org.apache.lucene.store with type parameters of type IOContext
Modifier and Type
Field
Description
`static final BiPredicate<String,IOContext>`
MMapDirectory.`ALL_FILES`
Argument for `MMapDirectory.setPreload(BiPredicate)` that configures all files to be preloaded upon opening them.
`static final BiPredicate<String,IOContext>`
MMapDirectory.`BASED_ON_LOAD_IO_CONTEXT`
Argument for `MMapDirectory.setPreload(BiPredicate)` that configures files to be preloaded upon opening them if they use the `ReadAdvice.RANDOM_PRELOAD` advice.
`static final BiPredicate<String,IOContext>`
MMapDirectory.`NO_FILES`
Argument for `MMapDirectory.setPreload(BiPredicate)` that configures no files to be preloaded upon opening them.
Methods in org.apache.lucene.store that return IOContext
Modifier and Type
Method
Description
`IOContext`
IOContext.`withReadAdvice(ReadAdvice advice)`
Return an updated `IOContext` that has the provided `ReadAdvice` if the `IOContext.Context` is a `IOContext.Context.DEFAULT` context, otherwise return this existing instance.
Methods in org.apache.lucene.store with parameters of type IOContext
Modifier and Type
Method
Description
`static int`
BufferedIndexInput.`bufferSize(IOContext context)`
Returns default buffer sizes for the given `IOContext`
`void`
Directory.`copyFrom(Directory from, String src, String dest, IOContext context)`
Copies an existing `src` file from directory `from` to a non-existent file `dest` in this directory.
`void`
LockValidatingDirectoryWrapper.`copyFrom(Directory from, String src, String dest, IOContext context)`
`void`
TrackingDirectoryWrapper.`copyFrom(Directory from, String src, String dest, IOContext context)`
`IndexOutput`
ByteBuffersDirectory.`createOutput(String name, IOContext context)`
`abstract IndexOutput`
Directory.`createOutput(String name, IOContext context)`
Creates a new, empty file in the directory and returns an `IndexOutput` instance for appending data to this file.
`IndexOutput`
FileSwitchDirectory.`createOutput(String name, IOContext context)`
`IndexOutput`
FilterDirectory.`createOutput(String name, IOContext context)`
`IndexOutput`
FSDirectory.`createOutput(String name, IOContext context)`
`IndexOutput`
LockValidatingDirectoryWrapper.`createOutput(String name, IOContext context)`
`IndexOutput`
NRTCachingDirectory.`createOutput(String name, IOContext context)`
`IndexOutput`
TrackingDirectoryWrapper.`createOutput(String name, IOContext context)`
`IndexOutput`
ByteBuffersDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`abstract IndexOutput`
Directory.`createTempOutput(String prefix, String suffix, IOContext context)`
Creates a new, empty, temporary file in the directory and returns an `IndexOutput` instance for appending data to this file.
`IndexOutput`
FileSwitchDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`IndexOutput`
FilterDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`IndexOutput`
FSDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`IndexOutput`
NRTCachingDirectory.`createTempOutput(String prefix, String suffix, IOContext context)`
`IndexOutput`
TrackingDirectoryWrapper.`createTempOutput(String prefix, String suffix, IOContext context)`
`protected boolean`
NRTCachingDirectory.`doCacheWrite(String name, IOContext context)`
Subclass can override this to customize logic; return true if this file should be written to the RAM-based cache first.
`IndexInput`
ByteBuffersDirectory.`openInput(String name, IOContext context)`
`abstract IndexInput`
Directory.`openInput(String name, IOContext context)`
Opens a stream for reading an existing file.
`IndexInput`
FileSwitchDirectory.`openInput(String name, IOContext context)`
`IndexInput`
FilterDirectory.`openInput(String name, IOContext context)`
`IndexInput`
MMapDirectory.`openInput(String name, IOContext context)`
Creates an IndexInput for the file with the given name.
`IndexInput`
NIOFSDirectory.`openInput(String name, IOContext context)`
`IndexInput`
NRTCachingDirectory.`openInput(String name, IOContext context)`
Method parameters in org.apache.lucene.store with type arguments of type IOContext
Modifier and Type
Method
Description
`void`
MMapDirectory.`setPreload(BiPredicate<String,IOContext> preload)`
Configure which files to preload in physical memory upon opening.
Constructors in org.apache.lucene.store with parameters of type IOContext
Modifier
Constructor
Description
``
`BufferedIndexInput(String resourceDesc, IOContext context)`