org.mapdb / DBMaker

DBMaker

object DBMaker

Author
Jan Kotek



Types

Maker class Maker
StoreType enum class StoreType

Functions

fileDB fun fileDB(file: String): Maker
fun fileDB(file: File): Maker
heapDB fun heapDB(): Maker

Creates new in-memory database which stores all data on heap without serialization. This mode should be very fast, but data will affect Garbage Collector the same way as traditional Java Collections.

heapShardedHashMap fun heapShardedHashMap(concurrency: Int): HashMapMaker<*, *>
heapShardedHashSet fun heapShardedHashSet(concurrency: Int): HashSetMaker<*>
memoryDB fun memoryDB(): Maker

Creates new in-memory database. Changes are lost after JVM exits. This option serializes data into {@code byte[]}, so they are not affected by Garbage Collector.

memoryDirectDB fun memoryDirectDB(): Maker
memoryShardedHashMap fun memoryShardedHashMap(concurrency: Int): HashMapMaker<*, *>
memoryShardedHashSet fun memoryShardedHashSet(concurrency: Int): HashSetMaker<*>
tempFileDB fun tempFileDB(): Maker

Creates new database in temporary folder. Files are deleted after store was closed

volumeDB fun volumeDB(volume: Volume, volumeExists: Boolean): Maker