Package org.rocksdb

Class WriteBatch.Handler

All Implemented Interfaces:
AutoCloseable
Enclosing class:
WriteBatch

public abstract static class WriteBatch.Handler extends RocksCallbackObject
Handler callback for iterating over the contents of a batch.
  • Constructor Details

    • Handler

      public Handler()
  • Method Details

    • initializeNative

      protected long initializeNative(long... nativeParameterHandles)
      Description copied from class: RocksCallbackObject
      Construct the Native C++ object which will callback to our object methods
      Specified by:
      initializeNative in class RocksCallbackObject
      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
    • markCommitWithTimestamp

      public abstract void markCommitWithTimestamp(byte[] xid, byte[] ts) throws RocksDBException
      Throws:
      RocksDBException
    • shouldContinue

      public boolean shouldContinue()
      shouldContinue is called by the underlying iterator WriteBatch.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.