Modifier and Type | Field and Description |
---|---|
private RAMIndex[] |
cluster |
private java.lang.String |
name |
private Row |
rowdef |
Modifier | Constructor and Description |
---|---|
|
RAMIndexCluster(java.lang.String name,
Row rowdef,
int clusterSize) |
private |
RAMIndexCluster(java.lang.String name,
Row rowdef,
RAMIndex[] array) |
Modifier and Type | Method and Description |
---|---|
private RAMIndex |
accessArray(int i) |
void |
addUnique(java.util.List<Row.Entry> rows) |
void |
addUnique(Row.Entry row) |
void |
clear() |
RAMIndexCluster |
clone() |
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 java.util.Comparator<Row.Entry> |
getEntryComparator() |
boolean |
has(byte[] key) |
long |
inc(byte[] key,
int col,
long add,
Row.Entry initrow) |
private int |
indexFor(byte[] key) |
private int |
indexFor(Row.Entry row) |
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.ArrayList<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.lang.String name
private final Row rowdef
private final RAMIndex[] cluster
public RAMIndexCluster(java.lang.String name, Row rowdef, int clusterSize)
public RAMIndexCluster clone()
clone
in class java.lang.Object
private final int indexFor(byte[] key)
private final int indexFor(Row.Entry row)
public final byte[] smallestKey()
smallestKey
in interface Index
public final byte[] largestKey()
largestKey
in interface Index
private final RAMIndex accessArray(int i)
public final void addUnique(Row.Entry row) throws SpaceExceededException
addUnique
in interface Index
SpaceExceededException
public final void addUnique(java.util.List<Row.Entry> rows) throws SpaceExceededException
SpaceExceededException
public final void deleteOnExit()
deleteOnExit
in interface Index
public java.util.Map<byte[],Row.Entry> get(java.util.Collection<byte[]> keys, boolean forcecopy) throws java.io.IOException, java.lang.InterruptedException
public final CloneableIterator<byte[]> keys(boolean up, byte[] firstKey)
public final boolean put(Row.Entry row) throws SpaceExceededException
put
in interface Index
row
- a index rowjava.io.IOException
SpaceExceededException
public final java.util.ArrayList<RowCollection> removeDoubles() throws SpaceExceededException
removeDoubles
in interface Index
SpaceExceededException
public final Row.Entry replace(Row.Entry row) throws SpaceExceededException
replace
in interface Index
SpaceExceededException
public final CloneableIterator<Row.Entry> rows(boolean up, byte[] firstKey)
private java.util.Comparator<Row.Entry> getEntryComparator()
public final CloneableIterator<Row.Entry> rows()
public final java.util.Iterator<Row.Entry> iterator()
public final long inc(byte[] key, int col, long add, Row.Entry initrow) throws SpaceExceededException
SpaceExceededException