class MapDBKeyValueStore : KeyValueStore
(source)
A key-value store backed by a MapDB instance.
dbPath
- The path to the MapDB database.
dispatcher
- The co-routine dispatcher for blocking tasks.
IOException
- If an I/O error occurs.
Return
A key-value store.
MapDBKeyValueStore(dbPath: Path, dispatcher: CoroutineDispatcher = Dispatchers.IO)
Open a MapDB-backed key-value store. |
fun close(): Unit
Closes the underlying MapDB 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): MapDBKeyValueStore
Open a MapDB-backed key-value store. |