Package org.apache.lucene.store
Class RAMFile
java.lang.Object
org.apache.lucene.store.RAMFile
- All Implemented Interfaces:
Accountable
Deprecated.
Represents a file in RAM as a list of byte[] buffers.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ArrayList<byte[]> Deprecated.(package private) RAMDirectoryDeprecated.(package private) longDeprecated.protected longDeprecated.Fields inherited from interface org.apache.lucene.util.Accountable
NULL_ACCOUNTABLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected final byte[]addBuffer(int size) Deprecated.booleanDeprecated.protected final byte[]getBuffer(int index) Deprecated.longDeprecated.inthashCode()Deprecated.protected byte[]newBuffer(int size) Deprecated.Expert: allocate a new buffer.protected final intDeprecated.longDeprecated.Return the memory usage of this object in bytes.protected voidsetLength(long length) Deprecated.toString()Deprecated.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
Field Details
-
buffers
Deprecated. -
length
long lengthDeprecated. -
directory
RAMDirectory directoryDeprecated. -
sizeInBytes
protected long sizeInBytesDeprecated.
-
-
Constructor Details
-
RAMFile
public RAMFile()Deprecated. -
RAMFile
RAMFile(RAMDirectory directory) Deprecated.
-
-
Method Details
-
getLength
public long getLength()Deprecated. -
setLength
protected void setLength(long length) Deprecated. -
addBuffer
protected final byte[] addBuffer(int size) Deprecated. -
getBuffer
protected final byte[] getBuffer(int index) Deprecated. -
numBuffers
protected final int numBuffers()Deprecated. -
newBuffer
protected byte[] newBuffer(int size) Deprecated.Expert: allocate a new buffer. Subclasses can allocate differently.- Parameters:
size- size of allocated buffer.- Returns:
- allocated buffer.
-
ramBytesUsed
public long ramBytesUsed()Deprecated.Description copied from interface:AccountableReturn the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsedin interfaceAccountable
-
toString
Deprecated. -
hashCode
public int hashCode()Deprecated. -
equals
Deprecated.
-
MMapDirectory. It will be removed in future versions of Lucene.