Package org.apache.lucene.util.fst
Class OnHeapFSTStore
- java.lang.Object
-
- org.apache.lucene.util.fst.OnHeapFSTStore
-
- All Implemented Interfaces:
Accountable,FSTReader
public final class OnHeapFSTStore extends Object implements FSTReader
Provides storage of finite state machine (FST), using byte array or byte store allocated 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 OnHeapFSTStore(int maxBlockBits, DataInput in, long numBytes)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FST.BytesReadergetReverseBytesReader()Get the reverse BytesReader for this FSTlongramBytesUsed()Return the memory usage of this object in bytes.voidwriteTo(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 Detail
-
OnHeapFSTStore
public OnHeapFSTStore(int maxBlockBits, DataInput in, long numBytes) throws IOException- Throws:
IOException
-
-
Method Detail
-
ramBytesUsed
public long ramBytesUsed()
Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
getReverseBytesReader
public FST.BytesReader getReverseBytesReader()
Description copied from interface:FSTReaderGet the reverse BytesReader for this FST- Specified by:
getReverseBytesReaderin interfaceFSTReader- Returns:
- the reverse BytesReader
-
writeTo
public void writeTo(DataOutput out) throws IOException
Description copied from interface:FSTReaderWrite this FST to another DataOutput- Specified by:
writeToin interfaceFSTReader- Parameters:
out- the DataOutput- Throws:
IOException- if exception occurred during writing
-
-