Package org.rocksdb

Class 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.
    • Constructor Detail

      • Handler

        public Handler()
    • Method Detail

      • 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​(byte[] key,
                                 byte[] value)
      • merge

        public abstract void merge​(byte[] key,
                                   byte[] value)
      • delete

        public abstract void delete​(byte[] key)
      • singleDelete

        public abstract void singleDelete​(byte[] key)
      • deleteRange

        public abstract void deleteRange​(byte[] beginKey,
                                         byte[] endKey)
      • logData

        public abstract void logData​(byte[] blob)
      • 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.