Modifier and Type | Field and Description |
---|---|
private Row.EntryComparator |
entryComparator |
private RowSet |
index0 |
private RowSet |
index1 |
private java.lang.String |
name |
private static java.util.Map<java.lang.String,RAMIndex> |
objectTracker |
private Row |
rowdef |
Modifier | Constructor and Description |
---|---|
|
RAMIndex(java.lang.String name,
Row rowdef) |
private |
RAMIndex(java.lang.String name,
Row rowdef,
RowSet index0,
RowSet index1,
Row.EntryComparator entryComparator) |
Modifier and Type | Method and Description |
---|---|
void |
addUnique(java.util.List<Row.Entry> rows) |
void |
addUnique(Row.Entry entry) |
void |
clear() |
RAMIndex |
clone() |
void |
close() |
boolean |
delete(byte[] key) |
void |
deleteOnExit() |
java.lang.String |
filename() |
protected void |
finishInitialization() |
Row.Entry |
get(byte[] key,
boolean forceclone) |
java.util.Map<byte[],Row.Entry> |
get(java.util.Collection<byte[]> keys,
boolean forcecopy) |
boolean |
has(byte[] key) |
long |
inc(byte[] key,
int col,
long add,
Row.Entry initrow) |
boolean |
isEmpty() |
java.util.Iterator<Row.Entry> |
iterator() |
CloneableIterator<byte[]> |
keys(boolean up,
byte[] firstKey) |
byte[] |
largestKey() |
long |
mem() |
static java.util.Iterator<java.util.Map.Entry<java.lang.String,RAMIndex>> |
objects() |
void |
optimize() |
boolean |
put(Row.Entry entry)
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 entry) |
void |
reset() |
void |
reset(int initialspace) |
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 static final java.util.Map<java.lang.String,RAMIndex> objectTracker
private final java.lang.String name
private final Row rowdef
private RowSet index0
private RowSet index1
private final Row.EntryComparator entryComparator
public RAMIndex(java.lang.String name, Row rowdef)
private RAMIndex(java.lang.String name, Row rowdef, RowSet index0, RowSet index1, Row.EntryComparator entryComparator)
public static final java.util.Iterator<java.util.Map.Entry<java.lang.String,RAMIndex>> objects()
public RAMIndex clone()
clone
in class java.lang.Object
public final void reset()
public final void reset(int initialspace) throws SpaceExceededException
SpaceExceededException
protected final void finishInitialization()
public final byte[] smallestKey()
smallestKey
in interface Index
public final byte[] largestKey()
largestKey
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 Row.Entry replace(Row.Entry entry) throws SpaceExceededException
replace
in interface Index
SpaceExceededException
public final boolean put(Row.Entry entry) throws SpaceExceededException
put
in interface Index
row
- a index rowjava.io.IOException
SpaceExceededException
public final void addUnique(Row.Entry entry) throws SpaceExceededException
addUnique
in interface Index
SpaceExceededException
public final void addUnique(java.util.List<Row.Entry> rows) throws SpaceExceededException
SpaceExceededException
public final long inc(byte[] key, int col, long add, Row.Entry initrow) throws SpaceExceededException
SpaceExceededException
public final java.util.ArrayList<RowCollection> removeDoubles() throws SpaceExceededException
removeDoubles
in interface Index
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 final CloneableIterator<byte[]> keys(boolean up, byte[] firstKey)
public final CloneableIterator<Row.Entry> rows(boolean up, byte[] firstKey)
public final java.util.Iterator<Row.Entry> iterator()
public final CloneableIterator<Row.Entry> rows()
public final void deleteOnExit()
deleteOnExit
in interface Index