public interface Index
Modifier and Type | Method and Description |
---|---|
int |
byteCount() |
ByteBuffer |
get(ByteBuffer key,
PayloadReader reader)
Gets the bytes of value given the key and payload storage reader.
|
byte[] |
getBytes() |
int |
keyCount() |
Iterator<ByteBuffer> |
keyIterator(PayloadReader reader)
Gets an iterator to iterate over all keys.
|
ByteBuffer |
nextKey(ByteBuffer currentKey,
PayloadReader reader)
Gets the next key relative to the current provided key.
|
boolean |
put(byte[] key,
byte[] value,
PayloadWriter writer)
Puts a key into the index and stores key and value data into payload storage.
|
boolean put(byte[] key, byte[] value, PayloadWriter writer) throws IOException
key
- bytes of keyvalue
- bytes of valuewriter
- writer to store key-value payloadIOException
ByteBuffer get(ByteBuffer key, PayloadReader reader) throws IOException
key
- bytes of keyreader
- reader to access key-value payloadIOException
byte[] getBytes()
int byteCount()
int keyCount()
ByteBuffer nextKey(ByteBuffer currentKey, PayloadReader reader)
This could be more efficient than iterating over keyIterator(PayloadReader)
to find
the next key.
currentKey
- the current key, or null if there is no initial key known yetreader
- reader to access key-value payloadIterator<ByteBuffer> keyIterator(PayloadReader reader)
This could be more efficient than repeatedly calling
nextKey(ByteBuffer, PayloadReader)
.
reader
- reader to access key-value payloadCopyright © 2023. All Rights Reserved.