Package org.rocksdb
Class RocksCallbackObject
java.lang.Object
org.rocksdb.AbstractNativeReference
org.rocksdb.AbstractImmutableNativeReference
org.rocksdb.RocksCallbackObject
- All Implemented Interfaces:
AutoCloseable
- Direct Known Subclasses:
AbstractCompactionFilterFactory,AbstractComparator,AbstractEventListener,AbstractTableFilter,AbstractTraceWriter,AbstractTransactionNotifier,AbstractWalFilter,Logger,WriteBatch.Handler
RocksCallbackObject is similar to
RocksObject but varies
in its construction as it is designed for Java objects which have functions
which are called from C++ via JNI.
RocksCallbackObject is the base-class any RocksDB classes that acts as a
callback from some underlying underlying native C++ rocksdb object.
The use of RocksObject should always be preferred over
RocksCallbackObject if callbacks are not required.
-
Field Summary
FieldsFields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_ -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidDeletes underlying C++ native callback object pointerprotected abstract longinitializeNative(long... nativeParameterHandles) Construct the Native C++ object which will callback to our object methodsMethods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Field Details
-
nativeHandle_
protected final long nativeHandle_
-
-
Constructor Details
-
RocksCallbackObject
protected RocksCallbackObject(long... nativeParameterHandles)
-
-
Method Details
-
initializeNative
protected abstract long initializeNative(long... nativeParameterHandles) Construct the Native C++ object which will callback to our object methods- 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++ native callback object pointer- Specified by:
disposeInternalin classAbstractImmutableNativeReference
-