Class Fork
- java.lang.Object
-
- com.exonum.binding.core.proxy.AbstractNativeProxy
-
- com.exonum.binding.core.storage.database.View
-
- com.exonum.binding.core.storage.database.Fork
-
public final class Fork extends View
A fork is a database view, allowing both read and write operations.A fork represents the database state at the time it was created plus any changes to the database made using this fork.
A fork allows to perform a transaction: a number of independent writes to the database, which then may be atomically applied (i.e. committed) to the database and change the database state.
-
-
Field Summary
-
Fields inherited from class com.exonum.binding.core.proxy.AbstractNativeProxy
nativeHandle
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Fork
newInstance(long nativeHandle, boolean owningHandle, Cleaner cleaner)
Creates a new Fork proxy.static Fork
newInstance(long nativeHandle, Cleaner cleaner)
Creates a new owning Fork proxy.-
Methods inherited from class com.exonum.binding.core.storage.database.View
canModify, findOpenIndex, getCleaner, getViewNativeHandle, registerIndex
-
Methods inherited from class com.exonum.binding.core.proxy.AbstractNativeProxy
getNativeHandle, isValidHandle
-
-
-
-
Method Detail
-
newInstance
public static Fork newInstance(long nativeHandle, Cleaner cleaner)
Creates a new owning Fork proxy.- Parameters:
nativeHandle
- a handle of the native Fork objectcleaner
- a cleaner to perform any operations
-
newInstance
public static Fork newInstance(long nativeHandle, boolean owningHandle, Cleaner cleaner)
Creates a new Fork proxy.- Parameters:
nativeHandle
- a handle of the native Fork objectowningHandle
- whether a proxy owns the corresponding native object and is responsible to clean it upcleaner
- a cleaner to perform any operations
-
-