Modifier and Type | Field and Description |
---|---|
private boolean |
exceed134217727 |
private java.io.File |
file |
private Row |
rowdef |
private int |
sizecache |
Constructor and Description |
---|
OnDemandOpenFileIndex(java.io.File file,
Row rowdef,
boolean exceed134217727) |
Modifier and Type | Method and Description |
---|---|
void |
addUnique(Row.Entry row) |
void |
clear() |
void |
close() |
boolean |
delete(byte[] key) |
void |
deleteOnExit() |
java.lang.String |
filename() |
Row.Entry |
get(byte[] key,
boolean forcecopy) |
java.util.Map<byte[],Row.Entry> |
get(java.util.Collection<byte[]> keys,
boolean forcecopy) |
private Index |
getIndex() |
boolean |
has(byte[] key) |
boolean |
isEmpty() |
java.util.Iterator<Row.Entry> |
iterator() |
CloneableIterator<byte[]> |
keys(boolean up,
byte[] firstKey) |
byte[] |
largestKey() |
long |
mem() |
void |
optimize() |
boolean |
put(Row.Entry row)
Adds the row to the index.
|
java.util.List<Row.Entry> |
random(int count) |
Row.Entry |
remove(byte[] key) |
java.util.List<RowCollection> |
removeDoubles() |
Row.Entry |
removeOne() |
Row.Entry |
replace(Row.Entry row) |
Row |
row() |
CloneableIterator<Row.Entry> |
rows() |
CloneableIterator<Row.Entry> |
rows(boolean up,
byte[] firstKey) |
int |
size() |
byte[] |
smallestKey() |
java.util.List<Row.Entry> |
top(int count) |
private final java.io.File file
private final Row rowdef
private int sizecache
private final boolean exceed134217727
public OnDemandOpenFileIndex(java.io.File file, Row rowdef, boolean exceed134217727)
private Index getIndex()
public byte[] smallestKey()
smallestKey
in interface Index
public byte[] largestKey()
largestKey
in interface Index
public void addUnique(Row.Entry row) throws SpaceExceededException, java.io.IOException
addUnique
in interface Index
SpaceExceededException
java.io.IOException
public void clear() throws java.io.IOException
public void deleteOnExit()
deleteOnExit
in interface Index
public Row.Entry get(byte[] key, boolean forcecopy) throws java.io.IOException
public java.util.Map<byte[],Row.Entry> get(java.util.Collection<byte[]> keys, boolean forcecopy) throws java.io.IOException, java.lang.InterruptedException
public boolean put(Row.Entry row) throws java.io.IOException, SpaceExceededException
put
in interface Index
row
- a index rowjava.io.IOException
SpaceExceededException
public Row.Entry remove(byte[] key) throws java.io.IOException
public boolean delete(byte[] key) throws java.io.IOException
public java.util.List<RowCollection> removeDoubles() throws java.io.IOException, SpaceExceededException
removeDoubles
in interface Index
java.io.IOException
SpaceExceededException
public java.util.List<Row.Entry> top(int count) throws java.io.IOException
public java.util.List<Row.Entry> random(int count) throws java.io.IOException
public Row.Entry removeOne() throws java.io.IOException
public Row.Entry replace(Row.Entry row) throws SpaceExceededException, java.io.IOException
replace
in interface Index
SpaceExceededException
java.io.IOException
public CloneableIterator<byte[]> keys(boolean up, byte[] firstKey) throws java.io.IOException
public java.util.Iterator<Row.Entry> iterator()
public CloneableIterator<Row.Entry> rows(boolean up, byte[] firstKey) throws java.io.IOException
public CloneableIterator<Row.Entry> rows() throws java.io.IOException