public class SstFileWriter extends RocksObject
nativeHandle_owningHandle_| Constructor and Description |
|---|
SstFileWriter(EnvOptions envOptions,
Options options)
SstFileWriter Constructor.
|
SstFileWriter(EnvOptions envOptions,
Options options,
AbstractComparator comparator)
Deprecated.
Use
SstFileWriter(EnvOptions, Options).
Passing an explicit comparator is deprecated in lieu of passing the
comparator as part of options. Use the other constructor instead. |
| Modifier and Type | Method and Description |
|---|---|
void |
add(DirectSlice key,
DirectSlice value)
Deprecated.
|
void |
add(Slice key,
Slice value)
Deprecated.
|
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, isOwningHandledispose, finalize@Deprecated public SstFileWriter(EnvOptions envOptions, Options options, AbstractComparator comparator)
SstFileWriter(EnvOptions, Options).
Passing an explicit comparator is deprecated in lieu of passing the
comparator as part of options. Use the other constructor instead.envOptions - EnvOptions instance.options - Options instance.comparator - the comparator to specify the ordering of keys.public 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.@Deprecated public void add(Slice key, Slice value) throws RocksDBException
put(Slice, Slice)key - the specified key to be inserted.value - the value associated with the specified key.RocksDBException - thrown if error happens in underlying
native library.@Deprecated public void add(DirectSlice key, DirectSlice value) throws RocksDBException
put(DirectSlice, DirectSlice)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(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 © 2021. All rights reserved.