public final class MemoryDb extends AbstractCloseableNativeProxy implements Database
NodeFakenativeHandle| Modifier and Type | Method and Description |
|---|---|
Fork |
createFork(Cleaner cleaner)
Creates a new database fork.
|
Snapshot |
createSnapshot(Cleaner cleaner)
Creates a new snapshot of the database state.
|
protected void |
disposeInternal()
Releases any resources owned by this proxy (e.g., the corresponding native object).
|
void |
merge(Fork fork)
Applies the changes from the given fork to the database state.
|
static MemoryDb |
newInstance()
Creates a new empty MemoryDb.
|
close, getNativeHandleisValidHandleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclosepublic static MemoryDb newInstance()
public Snapshot createSnapshot(Cleaner cleaner)
DatabasecreateSnapshot in interface Databasecleaner - a cleaner to register the snapshotpublic Fork createFork(Cleaner cleaner)
DatabaseA fork allows to perform a transaction: a number of independent writes to a database, which then may be atomically applied to the database.
createFork in interface Databasecleaner - a cleaner to register the forkpublic void merge(Fork fork)
fork - a fork to get changes fromprotected void disposeInternal()
AbstractCloseableNativeProxyThis method is only called once from AbstractCloseableNativeProxy.close() for a valid
proxy and shall not be called directly.
disposeInternal in class AbstractCloseableNativeProxyCopyright © 2019 Exonum. All rights reserved.