Interface Database
- All Superinterfaces:
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 Fork
createFork(Cleaner cleaner)
Creates a new database fork.Snapshot
createSnapshot(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
-