LevelDBOptions

@Serializable
data class LevelDBOptions(val blockRestartInterval: Int = 16, val blockSize: Int = 4 * 1024, val compression: LevelDBOptions.CompressionType = CompressionType.SNAPPY, val createIfMissing: Boolean = true, val errorIfExists: Boolean = false, val maxBytesForLevelBase: Long = 10L * 1024 * 1024, val maxBytesForLevelMultiplier: Int = 10, val maxFileSize: Long = 2L * 1024 * 1024, val maxOpenFiles: Int = 1000, val paranoidChecks: Boolean = false, val writeBufferSize: Long = 4L * 1024 * 1024)

Configuration options for creating and managing a LevelDB instance.

Constructors

Link copied to clipboard
constructor(blockRestartInterval: Int = 16, blockSize: Int = 4 * 1024, compression: LevelDBOptions.CompressionType = CompressionType.SNAPPY, createIfMissing: Boolean = true, errorIfExists: Boolean = false, maxBytesForLevelBase: Long = 10L * 1024 * 1024, maxBytesForLevelMultiplier: Int = 10, maxFileSize: Long = 2L * 1024 * 1024, maxOpenFiles: Int = 1000, paranoidChecks: Boolean = false, writeBufferSize: Long = 4L * 1024 * 1024)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Enum representing the types of compression algorithms that can be used for compressing data blocks in LevelDB.

Properties

Link copied to clipboard

Number of keys between restart points for delta encoding of keys.

Link copied to clipboard

Approximate size of user data packed per block, in bytes. Default is 4 KB.

Link copied to clipboard

Compression algorithm to use for blocks.

Link copied to clipboard

Whether to create the database if it does not exist.

Link copied to clipboard
val errorIfExists: Boolean = false

Whether to throw an error if the database already exists.

Link copied to clipboard

Maximum bytes for level base. Default is 10 MB.

Link copied to clipboard

Multiplier for the maximum bytes for levels.

Link copied to clipboard

Maximum size of a single file, in bytes. Default is 2 MB.

Link copied to clipboard
val maxOpenFiles: Int = 1000

Maximum number of open files that can be used by the database.

Link copied to clipboard
val paranoidChecks: Boolean = false

Whether to perform paranoid checks for file consistency.

Link copied to clipboard

Amount of data to build up in memory (backed by an unsorted log on disk) before converting to a sorted on-disk file, in bytes. Default is 4 MB.