public class SstFileWriter extends RocksObject
nativeHandle_owningHandle_| Constructor and Description |
|---|
SstFileWriter(EnvOptions envOptions,
Options options)
SstFileWriter Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
delete(byte[] key)
Add a deletion key to currently opened file.
|
void |
delete(DirectSlice key)
Add a deletion key to currently opened file.
|
void |
delete(Slice key)
Add a deletion key to currently opened file.
|
protected void |
disposeInternal(long handle) |
long |
fileSize()
Return the current file size.
|
void |
finish()
Finish the process and close the sst file.
|
void |
merge(byte[] key,
byte[] value)
Add a Merge key with value to currently opened file.
|
void |
merge(DirectSlice key,
DirectSlice value)
Add a Merge key with value to currently opened file.
|
void |
merge(Slice key,
Slice value)
Add a Merge key with value to currently opened file.
|
void |
open(String filePath)
Prepare SstFileWriter to write to a file.
|
void |
put(byte[] key,
byte[] value)
Add a Put key with value to currently opened file.
|
void |
put(ByteBuffer key,
ByteBuffer value)
Add a Put key with value to currently opened file.
|
void |
put(DirectSlice key,
DirectSlice value)
Add a Put key with value to currently opened file.
|
void |
put(Slice key,
Slice value)
Add a Put key with value to currently opened file.
|
disposeInternal, getNativeHandleclose, disOwnNativeHandle, isOwningHandlepublic SstFileWriter(EnvOptions envOptions, Options options)
envOptions - EnvOptions instance.options - Options instance.public void open(String filePath) throws RocksDBException
filePath - the location of fileRocksDBException - thrown if error happens in underlying
native library.public void put(Slice key, Slice value) throws RocksDBException
key - the specified key to be inserted.value - the value associated with the specified key.RocksDBException - thrown if error happens in underlying
native library.public void put(DirectSlice key, DirectSlice value) throws RocksDBException
key - the specified key to be inserted.value - the value associated with the specified key.RocksDBException - thrown if error happens in underlying
native library.public void put(ByteBuffer key, ByteBuffer value) throws RocksDBException
key - the specified key to be inserted.value - the value associated with the specified key.RocksDBException - thrown if error happens in underlying
native library.public void put(byte[] key,
byte[] value)
throws RocksDBException
key - the specified key to be inserted.value - the value associated with the specified key.RocksDBException - thrown if error happens in underlying
native library.public void merge(Slice key, Slice value) throws RocksDBException
key - the specified key to be merged.value - the value to be merged with the current value for
the specified key.RocksDBException - thrown if error happens in underlying
native library.public void merge(byte[] key,
byte[] value)
throws RocksDBException
key - the specified key to be merged.value - the value to be merged with the current value for
the specified key.RocksDBException - thrown if error happens in underlying
native library.public void merge(DirectSlice key, DirectSlice value) throws RocksDBException
key - the specified key to be merged.value - the value to be merged with the current value for
the specified key.RocksDBException - thrown if error happens in underlying
native library.public void delete(Slice key) throws RocksDBException
key - the specified key to be deleted.RocksDBException - thrown if error happens in underlying
native library.public void delete(DirectSlice key) throws RocksDBException
key - the specified key to be deleted.RocksDBException - thrown if error happens in underlying
native library.public void delete(byte[] key)
throws RocksDBException
key - the specified key to be deleted.RocksDBException - thrown if error happens in underlying
native library.public void finish()
throws RocksDBException
RocksDBException - thrown if error happens in underlying
native library.public long fileSize()
throws RocksDBException
RocksDBException - thrown if error happens in underlying
native library.protected final void disposeInternal(long handle)
disposeInternal in class RocksObjectCopyright © 2022. All rights reserved.