All Downloads are FREE. Search and download functionalities are using the official Maven repository.

commonMain.maryk.rocksdb.RocksIterator.kt Maven / Gradle / Ivy

package maryk.rocksdb

/**
 * An iterator that yields a sequence of key/value pairs from a source.
 * Multiple implementations are provided by this library.
 * In particular, iterators are provided
 * to access the contents of a Table or a DB.
 *
 *
 * Multiple threads can invoke const methods on an RocksIterator without
 * external synchronization, but if any of the threads may call a
 * non-const method, all threads accessing the same RocksIterator must use
 * external synchronization.
 *
 * @see maryk.rocksdb.RocksObject
 */
expect class RocksIterator : AbstractRocksIterator {
    /**
     * Return the key for the current entry.  The underlying storage for
     * the returned slice is valid only until the next modification of
     * the iterator.
     *
     * REQUIRES: [.isValid]
     *
     * @return key for the current entry.
     */
    fun key(): ByteArray

    /**
     * Return the value for the current entry.  The underlying storage for
     * the returned slice is valid only until the next modification of
     * the iterator.
     *
     * REQUIRES: !AtEnd() && !AtStart()
     * @return value for the current entry.
     */
    fun value(): ByteArray
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy