org.mapdb / StoreWAL


class StoreWAL : StoreDirectAbstract, StoreTx

StoreDirect with write ahead log


<init> StoreWAL(file: String?, volumeFactory: VolumeFactory, fileLockWait: Long, isThreadSafe: Boolean, concShift: Int, allocateIncrement: Long, allocateStartSize: Long, fileDeleteAfterClose: Boolean, fileDeleteAfterOpen: Boolean, checksum: Boolean, checksumHeader: Boolean, checksumHeaderBypass: Boolean)

StoreDirect with write ahead log


allocatedPages val allocatedPages: <ERROR CLASS>
cacheIndexLinks val cacheIndexLinks: <ERROR CLASS>
cacheIndexVals val cacheIndexVals: <ERROR CLASS>

modified indexVals, key is offset, value is indexValue

cacheRecords val cacheRecords: <ERROR CLASS>

modified records, key is offset, value is WAL ID

cacheStacks val cacheStacks: <ERROR CLASS>

stack pages, key is offset, value is content

headBytes val headBytes: ByteArray

header is stored in-memory, so it can be rolled back

headVol val headVol: SingleByteArrayVol
indexPagesBackup var indexPagesBackup: LongArray

backup for indexPages, restored on rollback

isReadOnly val isReadOnly: Boolean
realVolume val realVolume: Volume
volume val volume: Volume
wal val wal: WriteAheadLog

Inherited Properties

checksum val checksum: Boolean
checksumHeader val checksumHeader: Boolean
checksumHeaderBypass val checksumHeaderBypass: Boolean
closed val closed: AtomicBoolean
concShift val concShift: Int
dataTail var dataTail: Long

end of last record

file val file: String?
fileDeleteAfterClose val fileDeleteAfterClose: Boolean
indexPages val indexPages: <ERROR CLASS>
isClosed open val isClosed: Boolean
isThreadSafe open val isThreadSafe: Boolean

returns true if this is configured to be thread safe

locks val locks: Array<ReadWriteLock?>
maxRecid var maxRecid: Long

maximal allocated recid

segmentCount val segmentCount: Int
segmentMask val segmentMask: Long
structuralLock val structuralLock: Lock?
volumeExistsAtStart val volumeExistsAtStart: Boolean
volumeFactory val volumeFactory: VolumeFactory


allocateNewIndexPage fun allocateNewIndexPage(): Long
allocateNewPage fun allocateNewPage(): Long
close fun close(): Unit
commit fun commit(): Unit
compact fun compact(): Unit
compareAndSwap fun <R> compareAndSwap(recid: Long, expectedOldRecord: R?, newRecord: R?, serializer: Serializer<R>): Boolean
delete fun <R> delete(recid: Long, serializer: Serializer<R>): Unit
fileLoad fun fileLoad(): Boolean
freeSizeIncrement fun freeSizeIncrement(increment: Long): Unit
get fun <R> get(recid: Long, serializer: Serializer<R>): R?
getAllFiles fun getAllFiles(): Iterable<String>
getAllRecids fun getAllRecids(): LongIterator
getIndexVal fun getIndexVal(recid: Long): Long
linkedRecordDelete fun linkedRecordDelete(indexValue: Long, recid: Long): Unit
linkedRecordGet fun linkedRecordGet(indexValue: Long, recid: Long): ByteArray
linkedRecordPut fun linkedRecordPut(output: ByteArray, size: Int, recid: Long): Long
longStackFindEnd fun longStackFindEnd(pageOffset: Long, pos: Long): Long
longStackNewChunk fun longStackNewChunk(masterLinkOffset: Long, prevPageOffset: Long, value: Long, valueSize: Long, recursive: Boolean): Unit
longStackPut fun longStackPut(masterLinkOffset: Long, value: Long, recursive: Boolean): Unit
longStackTake fun longStackTake(masterLinkOffset: Long, recursive: Boolean): Long
preallocate fun preallocate(): Long
put fun <R> put(record: R?, serializer: Serializer<R>): Long
rollback fun rollback(): Unit
setIndexVal fun setIndexVal(recid: Long, value: Long): Unit
update fun <R> update(recid: Long, record: R?, serializer: Serializer<R>): Unit
verify fun verify(): Unit

Inherited Functions

allocateData fun allocateData(size: Int, recursive: Boolean): Long
allocateRecid fun allocateRecid(): Long
assertNotClosed fun assertNotClosed(): Unit
calculateChecksum fun calculateChecksum(): Long
calculateHeaderChecksum fun calculateHeaderChecksum(): Int
deserialize fun <R> deserialize(serializer: Serializer<R>, di: DataInput2, size: Long): R?
fileHeaderCheck fun fileHeaderCheck(): Unit
fileHeaderCompose fun fileHeaderCompose(): Long
indexValCompose fun indexValCompose(size: Long, offset: Long, linked: Int, unused: Int, archive: Int): Long
indexValFlagArchive fun indexValFlagArchive(indexValue: Long): Boolean
indexValFlagLinked fun indexValFlagLinked(indexValue: Long): Boolean
indexValFlagUnused fun indexValFlagUnused(indexValue: Long): Boolean
loadIndexPages fun loadIndexPages(indexPages: <ERROR CLASS>): Unit
longStackMasterLinkOffset fun longStackMasterLinkOffset(size: Long): Long
recidToOffset fun recidToOffset(recid2: Long): Long
recidToSegment fun recidToSegment(recid: Long): Int
releaseData fun releaseData(size: Long, offset: Long, recursive: Boolean): Unit
releaseRecid fun releaseRecid(recid: Long): Unit
serialize fun <R> serialize(record: R?, serializer: Serializer<R>): DataOutput2?
storeHeaderCompose fun storeHeaderCompose(): Int

Companion Object Properties

TOMB1 val TOMB1: Long

Companion Object Functions

make fun make(file: String? = null, volumeFactory: VolumeFactory = if(file==null) CC.DEFAULT_MEMORY_VOLUME_FACTORY else CC.DEFAULT_FILE_VOLUME_FACTORY, fileLockWait: Long = 0L, isThreadSafe: Boolean = true, concShift: Int = CC.STORE_DIRECT_CONC_SHIFT, allocateIncrement: Long = CC.PAGE_SIZE, allocateStartSize: Long = 0L, fileDeleteAfterClose: Boolean = false, fileDelteAfterOpen: Boolean = false, checksum: Boolean = false, checksumHeader: Boolean = true, checksumHeaderBypass: Boolean = false): StoreWAL