class RocksDBKeyValueStore : KeyValueStore
(source)
A key-value store backed by RocksDB.
dbPath
- The path to the RocksDB database.
options
- Options for the RocksDB database.
dispatcher
- The co-routine context for blocking tasks.
IOException
- If an I/O error occurs.
Return
A key-value store.
RocksDBKeyValueStore(dbPath: Path, options: <ERROR CLASS> = Options().setCreateIfMissing(true).setWriteBufferSize(268435456).setMaxOpenFiles(-1), dispatcher: CoroutineDispatcher = Dispatchers.IO)
Open a RocksDB-backed key-value store. |
fun close(): Unit
Closes the underlying RocksDB instance. |
|
suspend fun get(key: Bytes): Bytes?
Retrieves data from the store. |
|
suspend fun put(key: Bytes, value: Bytes): <ERROR CLASS>
Puts data into the store. |
open fun getAsync(key: Bytes): AsyncResult<Bytes?> open fun getAsync(dispatcher: CoroutineDispatcher, key: Bytes): AsyncResult<Bytes?>
Retrieves data from the store. |
|
open fun putAsync(key: Bytes, value: Bytes): AsyncCompletion open fun putAsync(dispatcher: CoroutineDispatcher, key: Bytes, value: Bytes): AsyncCompletion
Puts data into the store. |
fun open(dbPath: Path): RocksDBKeyValueStore fun open(dbPath: Path, options: <ERROR CLASS>): RocksDBKeyValueStore
Open a RocksDB-backed key-value store. |