Package org.rocksdb
Class RocksCallbackObject
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksCallbackObject
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Direct Known Subclasses:
AbstractCompactionFilterFactory,AbstractComparator,AbstractEventListener,AbstractTableFilter,AbstractTraceWriter,AbstractTransactionNotifier,AbstractWalFilter,Logger,WriteBatch.Handler
public abstract class RocksCallbackObject extends AbstractImmutableNativeReference
RocksCallbackObject is similar toRocksObjectbut 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++rocksdbobject. The use ofRocksObjectshould always be preferred overRocksCallbackObjectif callbacks are not required.
-
-
Field Summary
Fields Modifier and Type Field Description protected longnativeHandle_-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedRocksCallbackObject(long... nativeParameterHandles)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voiddisposeInternal()Deletes underlying C++ native callback object pointerprotected abstract longinitializeNative(long... nativeParameterHandles)Construct the Native C++ object which will callback to our object methods-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Method Detail
-
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
-
-