IOContext

class IOContext(context: IOContext.Context, mergeInfo: MergeInfo?, flushInfo: FlushInfo?, val readAdvice: ReadAdvice)

IOContext holds additional details on the merge/search context. An IOContext object can never be passed as a null parameter to either or

Parameters

context

An object of a enumerator Context type

mergeInfo

must be given when context == MERGE

flushInfo

must be given when context == FLUSH

readAdvice

Advice regarding the read access pattern

Constructors

Link copied to clipboard
constructor(context: IOContext.Context, mergeInfo: MergeInfo?, flushInfo: FlushInfo?, readAdvice: ReadAdvice)
constructor(flushInfo: FlushInfo?)

Creates an IOContext for flushing.

constructor(mergeInfo: MergeInfo?)

Creates an IOContext for merging.

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Context is an enumerator which specifies the context in which the Directory is being used.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard

Return an updated IOContext that has the provided ReadAdvice if the [ ] is a Context.DEFAULT context, otherwise return this existing instance. This helps preserve a ReadAdvice.SEQUENTIAL advice for merging, which is always the right choice, while allowing IndexInputs open for searching to use arbitrary [ ]s.