org.mapdb / DB / HashMapMaker

HashMapMaker

class HashMapMaker<K, V> : Maker<HTreeMap<K, V>>


Constructors

<init> HashMapMaker(db: DB, name: String, hasValues: Boolean = true, _storeFactory: (Int) -> Store = {i-> db.store})

Properties

_storeFactory val _storeFactory: (Int) -> Store
db val db: DB
hasValues val hasValues: Boolean
name val name: String
type val type: String

Functions

counterEnable fun counterEnable(): HashMapMaker<K, V>
create fun create(): HTreeMap<K, V>

Creates new collection if it does not exist, or throw {@link DBException.WrongConfiguration} if collection already exists.

create2 fun create2(catalog: SortedMap<String, String>): HTreeMap<K, V>
createOrOpen fun createOrOpen(): HTreeMap<K, V>

Create new collection or open existing.

expireAfterCreate fun expireAfterCreate(): HashMapMaker<K, V>
fun expireAfterCreate(ttl: Long): HashMapMaker<K, V>
fun expireAfterCreate(ttl: Long, unit: TimeUnit): HashMapMaker<K, V>
expireAfterGet fun expireAfterGet(): HashMapMaker<K, V>
fun expireAfterGet(ttl: Long): HashMapMaker<K, V>
fun expireAfterGet(ttl: Long, unit: TimeUnit): HashMapMaker<K, V>
expireAfterUpdate fun expireAfterUpdate(): HashMapMaker<K, V>
fun expireAfterUpdate(ttl: Long): HashMapMaker<K, V>
fun expireAfterUpdate(ttl: Long, unit: TimeUnit): HashMapMaker<K, V>
expireCompactThreshold fun expireCompactThreshold(freeFraction: Double): HashMapMaker<K, V>
expireExecutor fun expireExecutor(executor: ScheduledExecutorService?): HashMapMaker<K, V>
expireExecutorPeriod fun expireExecutorPeriod(period: Long): HashMapMaker<K, V>
expireMaxSize fun expireMaxSize(maxSize: Long): HashMapMaker<K, V>
expireOverflow fun expireOverflow(overflowMap: MutableMap<K, V?>): HashMapMaker<K, V>
expireStoreSize fun expireStoreSize(storeSize: Long): HashMapMaker<K, V>
hashSeed fun hashSeed(hashSeed: Int): HashMapMaker<K, V>
keySerializer fun <A> keySerializer(keySerializer: Serializer<A>): HashMapMaker<A, V>
layout fun layout(concurrency: Int, dirSize: Int, levels: Int): HashMapMaker<K, V>
modificationListener fun modificationListener(listener: MapModificationListener<K, V>): HashMapMaker<K, V>
open fun open(): HTreeMap<K, V>

Open existing collection, or throw {@link DBException.WrongConfiguration} if collection already exists.

open2 fun open2(catalog: SortedMap<String, String>): HTreeMap<K, V>
removeCollapsesIndexTreeDisable fun removeCollapsesIndexTreeDisable(): HashMapMaker<K, V>
valueInline fun valueInline(): HashMapMaker<K, V>
valueLoader fun valueLoader(valueLoader: (K) -> V): HashMapMaker<K, V>
valueSerializer fun <A> valueSerializer(valueSerializer: Serializer<A>): HashMapMaker<K, A>
verify fun verify(): Unit

Inherited Functions

make open fun make(): E

Create new collection or open existing.

make2 fun make2(create: Boolean?): E
makeOrGet open fun makeOrGet(): E