abstract class AsyncMerkleStorage : MerkleStorage (source)
Storage for use in a StoredMerklePatriciaTrie.
This abstract implementation of MerkleStorage provides variations of get/put methods that use AsyncResult and AsyncCompletion rather than kotlin coroutines, making it possible to implement in Java.
AsyncMerkleStorage()
Storage for use in a StoredMerklePatriciaTrie. |
open suspend fun get(hash: Bytes32): Bytes?
Get the stored content under the given hash. |
|
abstract fun getAsync(hash: Bytes32): AsyncResult<Optional<Bytes>>
Get the stored content under the given hash. |
|
open suspend fun put(hash: Bytes32, content: Bytes): Unit
Store content with a given hash. |
|
abstract fun putAsync(hash: Bytes32, content: Bytes): AsyncCompletion
Store content with a given hash. |