Class RoErasedAccess
- java.lang.Object
-
- com.exonum.binding.core.proxy.AbstractNativeProxy
-
- com.exonum.binding.core.storage.database.AbstractAccess
-
- com.exonum.binding.core.storage.database.RoErasedAccess
-
- All Implemented Interfaces:
Access
public final class RoErasedAccess extends AbstractAccess
A readonly, "erased", database Access object.This class primarily exists to support readonly forks and snapshots, but also supports other readonly accesses.
Readonly Forks
A readonly Fork sees all the changes made to the base Fork, but forbids modifications. That allows safely passing the readonly fork to foreign code.
A readonly fork forbids accessing the same index that is being modified in the base fork. Also, accessing an index in the readonly fork will make it inaccessible in the base fork.
-
-
Field Summary
-
Fields inherited from class com.exonum.binding.core.proxy.AbstractNativeProxy
nativeHandle
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static RoErasedAccessfromHandle(long nativeHandle, Cleaner cleaner)Creates a new erased readonly access from the native handle.CleanergetCleaner()Returns the cleaner of this access.-
Methods inherited from class com.exonum.binding.core.storage.database.AbstractAccess
canModify, getAccessNativeHandle, getEntry, getKeySet, getList, getMap, getOpenIndexes, getProofEntry, getProofList, getProofMap, getRawProofMap, getValueSet, nativeCanModify, nativeFree
-
Methods inherited from class com.exonum.binding.core.proxy.AbstractNativeProxy
getNativeHandle, isValidHandle
-
-
-
-
Method Detail
-
fromHandle
public static RoErasedAccess fromHandle(long nativeHandle, Cleaner cleaner)
Creates a new erased readonly access from the native handle. The destructor will be registered in the given cleaner.- Parameters:
nativeHandle- a handle of the native readonly ErasedAccess objectcleaner- a cleaner to destroy the native peer and any dependent objects
-
getCleaner
public Cleaner getCleaner()
Description copied from class:AbstractAccessReturns the cleaner of this access. It is supposed to be used with collections and other objects depending on this access.- Specified by:
getCleanerin classAbstractAccess
-
-