Package org.apache.lucene.store
Class RAMFile
- java.lang.Object
-
- org.apache.lucene.store.RAMFile
-
- All Implemented Interfaces:
Accountable
@Deprecated public class RAMFile extends java.lang.Object implements Accountable
Deprecated.This class uses inefficient synchronization and is discouraged in favor ofMMapDirectory
. It will be removed in future versions of Lucene.Represents a file in RAM as a list of byte[] buffers.
-
-
Field Summary
Fields Modifier and Type Field Description protected java.util.ArrayList<byte[]>
buffers
Deprecated.(package private) RAMDirectory
directory
Deprecated.(package private) long
length
Deprecated.protected long
sizeInBytes
Deprecated.
-
Constructor Summary
Constructors Constructor Description RAMFile()
Deprecated.RAMFile(RAMDirectory directory)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected byte[]
addBuffer(int size)
Deprecated.boolean
equals(java.lang.Object obj)
Deprecated.protected byte[]
getBuffer(int index)
Deprecated.long
getLength()
Deprecated.int
hashCode()
Deprecated.protected byte[]
newBuffer(int size)
Deprecated.Expert: allocate a new buffer.protected int
numBuffers()
Deprecated.long
ramBytesUsed()
Deprecated.Return the memory usage of this object in bytes.protected void
setLength(long length)
Deprecated.java.lang.String
toString()
Deprecated.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.apache.lucene.util.Accountable
getChildResources
-
-
-
-
Field Detail
-
buffers
protected final java.util.ArrayList<byte[]> buffers
Deprecated.
-
length
long length
Deprecated.
-
directory
RAMDirectory directory
Deprecated.
-
sizeInBytes
protected long sizeInBytes
Deprecated.
-
-
Constructor Detail
-
RAMFile
public RAMFile()
Deprecated.
-
RAMFile
RAMFile(RAMDirectory directory)
Deprecated.
-
-
Method Detail
-
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:Accountable
Return the memory usage of this object in bytes. Negative values are illegal.- Specified by:
ramBytesUsed
in interfaceAccountable
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
hashCode
public int hashCode()
Deprecated.- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)
Deprecated.- Overrides:
equals
in classjava.lang.Object
-
-