public class IndexTable
extends java.lang.Object
Constructor and Description |
---|
IndexTable(java.io.File location,
int keysize,
int payloadsize,
boolean useTailCache,
boolean exceed134217727)
create an index with given (fixed) key and value length
|
Modifier and Type | Method and Description |
---|---|
void |
clear()
clear the index
|
void |
close()
close the index.
|
long |
get(byte[] key)
get a value from the index
|
boolean |
has(byte[] key)
check if a given value exists in the index.
|
java.lang.Long |
put(byte[] key,
long value)
Write an index entry.
|
java.lang.Long |
remove(byte[] key)
remove a given key from the index
|
private final Table table
public IndexTable(java.io.File location, int keysize, int payloadsize, boolean useTailCache, boolean exceed134217727) throws java.io.IOException
location
- keysize
- payloadsize
- useTailCache
- exceed134217727
- java.io.IOException
public java.lang.Long put(byte[] key, long value) throws java.io.IOException
key
- value
- java.io.IOException
public long get(byte[] key) throws java.io.IOException
key
- java.io.IOException
public boolean has(byte[] key)
key
- public java.lang.Long remove(byte[] key) throws java.io.IOException
key
- java.io.IOException
public void clear() throws java.io.IOException
java.io.IOException
public void close()