@ThreadSafe public interface Importer extends Closeable
Since import is multi threaded, implementations must be thread-safe.
Modifier and Type | Method and Description |
---|---|
void |
clearTree(TreeName treeName)
Clear the tree whose name is provided.
|
void |
close() |
SequentialCursor<ByteString,ByteString> |
openCursor(TreeName treeName)
Opens a cursor on the tree whose name is provided.
|
void |
put(TreeName treeName,
ByteSequence key,
ByteSequence value)
Creates a record with the provided key and value in the tree identified by the provided name.
|
ByteString |
read(TreeName treeName,
ByteSequence key)
Reads the record's value associated to the provided key, in the tree whose name is provided.
|
void clearTree(TreeName treeName)
treeName
- name of the tree to clearvoid put(TreeName treeName, ByteSequence key, ByteSequence value)
read(TreeName, ByteSequence)
and openCursor(TreeName)
methods
of this instance. The record is guaranteed to be persisted only after close()
.treeName
- the tree namekey
- the new record's keyvalue
- the new record's valueByteString read(TreeName treeName, ByteSequence key)
treeName
- the tree namekey
- the record's keynull
if none existsSequentialCursor<ByteString,ByteString> openCursor(TreeName treeName)
put(TreeName, ByteSequence, ByteSequence)
operations. Indeed, once opened, cursors might not reflect
changes.treeName
- the tree namevoid close()
close
in interface AutoCloseable
close
in interface Closeable
Copyright 2010-2022 ForgeRock AS.