public final class RowHandleSet extends java.lang.Object implements HandleSet, java.lang.Iterable<byte[]>, java.lang.Cloneable, java.io.Serializable
Modifier and Type | Field and Description |
---|---|
private RowSet |
index |
private Row |
rowdef |
private static long |
serialVersionUID |
Modifier | Constructor and Description |
---|---|
|
RowHandleSet(int keylength,
ByteOrder objectOrder,
java.io.File file)
initialize a HandleSet with the content of a dump
|
|
RowHandleSet(int keylength,
ByteOrder objectOrder,
int expectedspace) |
|
RowHandleSet(Row rowdef,
byte[] b) |
private |
RowHandleSet(Row rowdef,
RowSet index) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
RowHandleSet |
clone() |
void |
close() |
ByteOrder |
comparator() |
int |
dump(java.io.File file)
write a dump of the set to a file.
|
void |
excludeDestructive(java.util.Set<byte[]> other) |
byte[] |
export() |
byte[] |
getOne(int idx)
get one entry; objects are taken from the end of the list
a getOne(0) would return the same object as removeOne() would remove
|
boolean |
has(byte[] key) |
boolean |
isEmpty() |
java.util.Iterator<byte[]> |
iterator() |
HandleSet |
joinConstructive(HandleSet other) |
static HandleSet |
joinConstructive(HandleSet set1,
HandleSet set2) |
private static HandleSet |
joinConstructiveByEnumeration(HandleSet set1,
HandleSet set2) |
private static HandleSet |
joinConstructiveByTest(HandleSet small,
HandleSet large) |
int |
keylen() |
CloneableIterator<byte[]> |
keys(boolean up,
byte[] firstKey) |
byte[] |
largestKey() |
static void |
main(java.lang.String[] args) |
void |
optimize() |
boolean |
put(byte[] key)
Adds the key to the set
|
void |
putAll(HandleSet aset) |
void |
putUnique(byte[] key) |
boolean |
remove(byte[] key) |
byte[] |
removeOne() |
Row |
row() |
int |
size() |
byte[] |
smallestKey() |
java.lang.String |
toString() |
private static final long serialVersionUID
private final Row rowdef
private RowSet index
public RowHandleSet(int keylength, ByteOrder objectOrder, int expectedspace)
public RowHandleSet(Row rowdef, byte[] b) throws SpaceExceededException
SpaceExceededException
public RowHandleSet(int keylength, ByteOrder objectOrder, java.io.File file) throws java.io.IOException, SpaceExceededException
keylength
- objectOrder
- file
- java.io.IOException
SpaceExceededException
public RowHandleSet clone()
public final int dump(java.io.File file) throws java.io.IOException
public final byte[] smallestKey()
smallestKey
in interface HandleSet
public final byte[] largestKey()
largestKey
in interface HandleSet
public ByteOrder comparator()
comparator
in interface HandleSet
public final Row row()
public final void putAll(HandleSet aset) throws SpaceExceededException
putAll
in interface HandleSet
SpaceExceededException
public final boolean put(byte[] key) throws SpaceExceededException
put
in interface HandleSet
key
- java.io.IOException
SpaceExceededException
public final void putUnique(byte[] key) throws SpaceExceededException
putUnique
in interface HandleSet
SpaceExceededException
public final byte[] getOne(int idx)
public final CloneableIterator<byte[]> keys(boolean up, byte[] firstKey)
public final java.util.Iterator<byte[]> iterator()
public final java.lang.String toString()
toString
in class java.lang.Object
public HandleSet joinConstructive(HandleSet other) throws SpaceExceededException
SpaceExceededException
public static HandleSet joinConstructive(HandleSet set1, HandleSet set2) throws SpaceExceededException
SpaceExceededException
private static HandleSet joinConstructiveByTest(HandleSet small, HandleSet large) throws SpaceExceededException
SpaceExceededException
private static HandleSet joinConstructiveByEnumeration(HandleSet set1, HandleSet set2) throws SpaceExceededException
SpaceExceededException
public void excludeDestructive(java.util.Set<byte[]> other)
excludeDestructive
in interface HandleSet
public static void main(java.lang.String[] args)