Interface ReadableTransaction
-
- All Known Subinterfaces:
WriteableTransaction
public interface ReadableTransaction
Represents a readable transaction on a storage engine.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description long
getRecordCount(TreeName treeName)
Returns the number of key/value pairs in the provided tree.Cursor<ByteString,ByteString>
openCursor(TreeName treeName)
Opens a cursor on the tree whose name is provided.ByteString
read(TreeName treeName, ByteSequence key)
Reads the record's value associated to the provided key, in the tree whose name is provided.
-
-
-
Method Detail
-
read
ByteString read(TreeName treeName, ByteSequence key)
Reads the record's value associated to the provided key, in the tree whose name is provided.- Parameters:
treeName
- the tree namekey
- the record's key- Returns:
- the record's value, or
null
if none exists
-
openCursor
Cursor<ByteString,ByteString> openCursor(TreeName treeName)
Opens a cursor on the tree whose name is provided.- Parameters:
treeName
- the tree name- Returns:
- a new cursor
-
getRecordCount
long getRecordCount(TreeName treeName)
Returns the number of key/value pairs in the provided tree.- Parameters:
treeName
- the tree name- Returns:
- the number of key/value pairs in the provided tree.
-
-