Package org.apache.lucene.util.fst

# Class OffHeapFSTStore

java.lang.Object
org.apache.lucene.util.fst.OffHeapFSTStore

All Implemented Interfaces:
  `Accountable`, `FSTReader`

public final class OffHeapFSTStore extends Object implements FSTReader
Provides off heap storage of finite state machine (FST), using underlying index input instead of byte store on heap

WARNING: This API is experimental and might change in incompatible ways in the next release.

- ## Field Summary

  ### Fields inherited from interface org.apache.lucene.util.Accountable

  `NULL_ACCOUNTABLE`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `OffHeapFSTStore(IndexInput in, long offset, FST.FSTMetadata<?> metadata)`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `FST.BytesReader`
  `getReverseBytesReader()`
  Get the reverse BytesReader for this FST
  `long`
  `ramBytesUsed()`
  Return the memory usage of this object in bytes.
  `long`
  `size()`
  `void`
  `writeTo(DataOutput out)`
  Write this FST to another DataOutput

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

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface org.apache.lucene.util.Accountable

  `getChildResources`

- ## Constructor Details

  - ### OffHeapFSTStore

    public OffHeapFSTStore(IndexInput in, long offset, FST.FSTMetadata<?> metadata)

- ## Method Details

  - ### ramBytesUsed

    public long ramBytesUsed()
    Description copied from interface: `Accountable`
    Return the memory usage of this object in bytes. Negative values are illegal.
    Specified by:
      `ramBytesUsed` in interface `Accountable`

  - ### size

    public long size()

  - ### getReverseBytesReader

    public FST.BytesReader getReverseBytesReader()
    Description copied from interface: `FSTReader`
    Get the reverse BytesReader for this FST
    Specified by:
      `getReverseBytesReader` in interface `FSTReader`
    Returns:
      the reverse BytesReader

  - ### writeTo

    public void writeTo(DataOutput out) throws IOException
    Description copied from interface: `FSTReader`
    Write this FST to another DataOutput
    Specified by:
      `writeTo` in interface `FSTReader`
    Parameters:
      `out` - the DataOutput
    Throws:
      `IOException` - if exception occurred during writing