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 either `Directory.openInput(String, IOContext)` or `Directory.createOutput(String, IOContext)`

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and 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 and Description
    --- | ---
    `IOContext.Context` | `context` An object of a enumerator Context type
    `static IOContext` | `DEFAULT`
    `FlushInfo` | `flushInfo`
    `MergeInfo` | `mergeInfo`
    `static IOContext` | `READ`
    `boolean` | `readOnce`
    `static IOContext` | `READONCE`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `IOContext()`
    `IOContext(FlushInfo flushInfo)`
    `IOContext(IOContext.Context context)`
    `IOContext(IOContext ctxt, boolean readOnce)` This constructor is used to initialize a `IOContext` instance with a new value for the readOnce variable.
    `IOContext(MergeInfo mergeInfo)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object obj)`
    `int` | `hashCode()`
    `String` | `toString()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### 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

    - #### DEFAULT

          public static final IOContext DEFAULT

    - #### READONCE

          public static final IOContext READONCE

    - #### READ

          public static final IOContext READ

  - ### Constructor Detail

    - #### IOContext

          public IOContext()

    - #### IOContext

          public IOContext(FlushInfo flushInfo)

    - #### IOContext

          public IOContext(IOContext.Context context)

    - #### 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.
      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.

  - ### Method Detail

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`

    - #### equals

          public boolean equals(Object obj)

      Overrides:
        `equals` in class `Object`

    - #### toString

          public String toString()

      Overrides:
        `toString` in class `Object`

Copyright © 2000-2013 Apache Software Foundation. All Rights Reserved.