Package org.rocksdb
Class AbstractTransactionNotifier
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksCallbackObject
org.rocksdb.AbstractTransactionNotifier
- All Implemented Interfaces:
AutoCloseable
Provides notification to the caller of SetSnapshotOnNextOperation when
the actual snapshot gets created
-
Field Summary
Fields inherited from class org.rocksdb.RocksCallbackObject
nativeHandle_Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeletes underlying C++ TransactionNotifier pointer.protected final voiddisposeInternal(long handle) protected longinitializeNative(long... nativeParameterHandles) Construct the Native C++ object which will callback to our object methodsabstract voidsnapshotCreated(Snapshot newSnapshot) Implement this method to receive notification when a snapshot is requested viaTransaction.setSnapshotOnNextOperation().Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Constructor Details
-
AbstractTransactionNotifier
protected AbstractTransactionNotifier()
-
-
Method Details
-
snapshotCreated
Implement this method to receive notification when a snapshot is requested viaTransaction.setSnapshotOnNextOperation().- Parameters:
newSnapshot- the snapshot that has been created.
-
initializeNative
protected long initializeNative(long... nativeParameterHandles) Description copied from class:RocksCallbackObjectConstruct the Native C++ object which will callback to our object methods- Specified by:
initializeNativein classRocksCallbackObject- Parameters:
nativeParameterHandles- An array of native handles for any parameter objects that are needed during construction- Returns:
- The native handle of the C++ object which will callback to us
-
disposeInternal
protected void disposeInternal()Deletes underlying C++ TransactionNotifier pointer.Note that this function should be called only after all Transactions referencing the comparator are closed. Otherwise, an undefined behavior will occur.
- Overrides:
disposeInternalin classRocksCallbackObject
-
disposeInternal
protected final void disposeInternal(long handle)
-