Package org.rocksdb
Class WriteBatch.Handler
- java.lang.Object
-
- org.rocksdb.AbstractNativeReference
-
- org.rocksdb.AbstractImmutableNativeReference
-
- org.rocksdb.RocksCallbackObject
-
- org.rocksdb.WriteBatch.Handler
-
- All Implemented Interfaces:
java.lang.AutoCloseable
- Enclosing class:
- WriteBatch
public abstract static class WriteBatch.Handler extends RocksCallbackObject
Handler callback for iterating over the contents of a batch.
-
-
Field Summary
-
Fields inherited from class org.rocksdb.RocksCallbackObject
nativeHandle_
-
Fields inherited from class org.rocksdb.AbstractImmutableNativeReference
owningHandle_
-
-
Constructor Summary
Constructors Constructor Description Handler()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract voiddelete(byte[] key)abstract voiddelete(int columnFamilyId, byte[] key)abstract voiddeleteRange(byte[] beginKey, byte[] endKey)abstract voiddeleteRange(int columnFamilyId, byte[] beginKey, byte[] endKey)protected longinitializeNative(long... nativeParameterHandles)Construct the Native C++ object which will callback to our object methodsabstract voidlogData(byte[] blob)abstract voidmarkBeginPrepare()abstract voidmarkCommit(byte[] xid)abstract voidmarkEndPrepare(byte[] xid)abstract voidmarkNoop(boolean emptyBatch)abstract voidmarkRollback(byte[] xid)abstract voidmerge(byte[] key, byte[] value)abstract voidmerge(int columnFamilyId, byte[] key, byte[] value)abstract voidput(byte[] key, byte[] value)abstract voidput(int columnFamilyId, byte[] key, byte[] value)abstract voidputBlobIndex(int columnFamilyId, byte[] key, byte[] value)booleanshouldContinue()shouldContinue is called by the underlying iteratorWriteBatch.iterate(Handler).abstract voidsingleDelete(byte[] key)abstract voidsingleDelete(int columnFamilyId, byte[] key)-
Methods inherited from class org.rocksdb.RocksCallbackObject
disposeInternal
-
Methods inherited from class org.rocksdb.AbstractImmutableNativeReference
close, disOwnNativeHandle, isOwningHandle
-
Methods inherited from class org.rocksdb.AbstractNativeReference
dispose, finalize
-
-
-
-
Method Detail
-
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
-
put
public abstract void put(int columnFamilyId, byte[] key, byte[] value) throws RocksDBException- Throws:
RocksDBException
-
put
public abstract void put(byte[] key, byte[] value)
-
merge
public abstract void merge(int columnFamilyId, byte[] key, byte[] value) throws RocksDBException- Throws:
RocksDBException
-
merge
public abstract void merge(byte[] key, byte[] value)
-
delete
public abstract void delete(int columnFamilyId, byte[] key) throws RocksDBException- Throws:
RocksDBException
-
delete
public abstract void delete(byte[] key)
-
singleDelete
public abstract void singleDelete(int columnFamilyId, byte[] key) throws RocksDBException- Throws:
RocksDBException
-
singleDelete
public abstract void singleDelete(byte[] key)
-
deleteRange
public abstract void deleteRange(int columnFamilyId, byte[] beginKey, byte[] endKey) throws RocksDBException- Throws:
RocksDBException
-
deleteRange
public abstract void deleteRange(byte[] beginKey, byte[] endKey)
-
logData
public abstract void logData(byte[] blob)
-
putBlobIndex
public abstract void putBlobIndex(int columnFamilyId, byte[] key, byte[] value) throws RocksDBException- Throws:
RocksDBException
-
markBeginPrepare
public abstract void markBeginPrepare() throws RocksDBException- Throws:
RocksDBException
-
markEndPrepare
public abstract void markEndPrepare(byte[] xid) throws RocksDBException- Throws:
RocksDBException
-
markNoop
public abstract void markNoop(boolean emptyBatch) throws RocksDBException- Throws:
RocksDBException
-
markRollback
public abstract void markRollback(byte[] xid) throws RocksDBException- Throws:
RocksDBException
-
markCommit
public abstract void markCommit(byte[] xid) throws RocksDBException- Throws:
RocksDBException
-
shouldContinue
public boolean shouldContinue()
shouldContinue is called by the underlying iteratorWriteBatch.iterate(Handler). If it returns false, iteration is halted. Otherwise, it continues iterating. The default implementation always returns true.- Returns:
- boolean value indicating if the iteration is halted.
-
-