Class AbstractStorageIterator

  • Direct Known Subclasses:
    RocksDBStorageIterator

    public abstract class AbstractStorageIterator
    extends java.lang.Object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean isValid()  
      byte[] key()  
      void next()
      Moves to the next entry
      void prev()
      Moves to the previous entry
      void seek​(byte[] key)
      Seeks to the first entry whose key is greater than or equal to the given key
      void seekToFirst()
      Seek to the first key
      void seekToLast()
      Seek to the last key
      byte[] value()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractStorageIterator

        public AbstractStorageIterator()
    • Method Detail

      • isValid

        public boolean isValid()
        Returns:
        true if the iterator is valid
      • key

        public byte[] key()
        Returns:
        the key of the current entry
      • value

        public byte[] value()
        Returns:
        the value of the current entry
      • next

        public void next()
        Moves to the next entry
      • prev

        public void prev()
        Moves to the previous entry
      • seek

        public void seek​(byte[] key)
        Seeks to the first entry whose key is greater than or equal to the given key
        Parameters:
        key - the key to seek to
      • seekToFirst

        public void seekToFirst()
        Seek to the first key
      • seekToLast

        public void seekToLast()
        Seek to the last key