Interface Database
- All Superinterfaces:
java.lang.AutoCloseable,CloseableNativeProxy
- All Known Implementing Classes:
TemporaryDb
public interface Database extends CloseableNativeProxy
Represents an underlying Exonum Storage database.
-
Method Summary
Modifier and Type Method Description ForkcreateFork(Cleaner cleaner)Creates a new database fork.SnapshotcreateSnapshot(Cleaner cleaner)Creates a new snapshot of the database state.
-
Method Details
-
createSnapshot
Creates a new snapshot of the database state.- Parameters:
cleaner- a cleaner to register the snapshot- Returns:
- a new snapshot of the database state
-
createFork
Creates a new database fork.A fork allows to perform a transaction: a number of independent writes to a database, which then may be atomically applied to the database.
- Parameters:
cleaner- a cleaner to register the fork- Returns:
- a new database fork
-