Package org.apache.lucene.util.fst
Class OnHeapFSTStore
java.lang.Object
org.apache.lucene.util.fst.OnHeapFSTStore
- All Implemented Interfaces:
Accountable
,FSTStore
Provides storage of finite state machine (FST), using byte array or byte store allocated on heap.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long
private BytesStore
ABytesStore
, used during building, or during reading when the FST is very large (more than 1 GB).private byte[]
Used at read time when the FST fits into a single byte[].private final int
Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
Return the memory usage of this object in bytes.long
size()
void
writeTo
(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 Details
-
BASE_RAM_BYTES_USED
private static final long BASE_RAM_BYTES_USED -
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[] bytesArrayUsed at read time when the FST fits into a single byte[]. -
maxBlockBits
private final int maxBlockBits
-
-
Constructor Details
-
OnHeapFSTStore
public OnHeapFSTStore(int maxBlockBits)
-
-
Method Details
-
init
- Specified by:
init
in interfaceFSTStore
- Throws:
IOException
-
size
public long size() -
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 interfaceAccountable
-
getReverseBytesReader
- Specified by:
getReverseBytesReader
in interfaceFSTStore
-
writeTo
- Specified by:
writeTo
in interfaceFSTStore
- Throws:
IOException
-