Package org.apache.lucene.util.fst
Class OnHeapFSTStore
- java.lang.Object
-
- org.apache.lucene.util.fst.OnHeapFSTStore
-
- All Implemented Interfaces:
Accountable,FSTStore
public final class OnHeapFSTStore extends java.lang.Object implements FSTStore
Provides storage of finite state machine (FST), using byte array or byte store allocated on heap.
-
-
Field Summary
Fields Modifier and Type Field Description private static longBASE_RAM_BYTES_USEDprivate BytesStorebytesABytesStore, used during building, or during reading when the FST is very large (more than 1 GB).private byte[]bytesArrayUsed at read time when the FST fits into a single byte[].private intmaxBlockBits-
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
-
Constructor Summary
Constructors Constructor Description OnHeapFSTStore(int maxBlockBits)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FST.BytesReadergetReverseBytesReader()voidinit(DataInput in, long numBytes)longramBytesUsed()Return the memory usage of this object in bytes.longsize()voidwriteTo(DataOutput out)-
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
-
-
-
-
Field Detail
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED
-
bytes
private BytesStore bytes
ABytesStore, used during building, or during reading when the FST is very large (more than 1 GB). If the FST is less than 1 GB then bytesArray is set instead.
-
bytesArray
private byte[] bytesArray
Used at read time when the FST fits into a single byte[].
-
maxBlockBits
private final int maxBlockBits
-
-
Method Detail
-
init
public void init(DataInput in, long numBytes) throws java.io.IOException
-
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()
- Specified by:
getReverseBytesReaderin interfaceFSTStore
-
writeTo
public void writeTo(DataOutput out) throws java.io.IOException
-
-