public final class BufferedRecords
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private java.util.TreeMap<java.lang.Long,byte[]> |
buffer |
private Records |
efs |
private int |
maxEntries |
Constructor and Description |
---|
BufferedRecords(Records efs,
int maxEntries) |
Modifier and Type | Method and Description |
---|---|
void |
add(byte[] b,
int start) |
void |
cleanLast() |
void |
cleanLast(byte[] b,
int start) |
void |
clear() |
void |
close() |
void |
deleteOnExit() |
java.io.File |
filename() |
protected void |
finalize() |
void |
flushBuffer()
flush the buffer: this shall be called before any file-based iterations
on data structures on records are made
|
private void |
flushBuffer0() |
void |
get(long index,
byte[] b,
int start) |
static void |
main(java.lang.String[] args)
main - writes some data and checks the tables size (with time measureing)
|
void |
put(long index,
byte[] b,
int start) |
long |
size() |
private final Records efs
private final int maxEntries
private final java.util.TreeMap<java.lang.Long,byte[]> buffer
public BufferedRecords(Records efs, int maxEntries)
public void clear()
public void flushBuffer() throws java.io.IOException
java.io.IOException
private final void flushBuffer0() throws java.io.IOException
java.io.IOException
public final long size() throws java.io.IOException
java.io.IOException
public final java.io.File filename()
public final void close()
protected final void finalize()
finalize
in class java.lang.Object
public final void get(long index, byte[] b, int start) throws java.io.IOException
java.io.IOException
public final void put(long index, byte[] b, int start) throws java.io.IOException
java.io.IOException
public final void add(byte[] b, int start) throws java.io.IOException
java.io.IOException
public final void cleanLast(byte[] b, int start) throws java.io.IOException
java.io.IOException
public final void cleanLast() throws java.io.IOException
java.io.IOException
public final void deleteOnExit()
public static void main(java.lang.String[] args)
args
-