org.mapdb / WriteAheadLog

WriteAheadLog

open class WriteAheadLog

WAL shared between StoreWAL



Types

WALReplay interface WALReplay

Constructors

<init> WriteAheadLog(fileName: String, volumeFactory: VolumeFactory, featureBitMap: Long, fileDeleteAfterOpen: Boolean)
WriteAheadLog(fileName: String)

Properties

NOREPLAY static val NOREPLAY: WALReplay

does nothing

Functions

close open fun close(): Unit
commit open fun commit(): Unit
destroyWalFiles open fun destroyWalFiles(): Unit
fileLoad open fun fileLoad(): Boolean
getAllFiles open fun getAllFiles(): MutableIterable<String>
getNumberOfFiles open fun getNumberOfFiles(): Long
initFailedCloseFiles open fun initFailedCloseFiles(): Unit
replayWAL open fun replayWAL(replay: WALReplay): Unit
rollback open fun rollback(): Unit
seal open fun seal(): Unit
startNextFile open fun startNextFile(): Unit
sync open fun sync(): Unit
walGetByteArray open fun walGetByteArray(walPointer: Long): DataInput2

Retrieve DataInput from WAL. This data were written by WriteAheadLog#walPutByteArray(long, byte[], int, int)

walGetByteArray2 open fun walGetByteArray2(walPointer: Long): ByteArray

Retrieve byte[] from WAL. This data were written by WriteAheadLog#walPutByteArray(long, byte[], int, int)

walGetRecord open fun walGetRecord(walPointer: Long, expectedRecid: Long): ByteArray
walPutByteArray open fun walPutByteArray(offset: Long, buf: ByteArray, bufPos: Int, size: Int): Long

Puts instruction into WAL. It should write part of byte[] at given offset. This value returns pointer to WAL, which can be used to retrieve data back with WriteAheadLog#walGetByteArray(long). Pointer is composed of file number, and offset in WAL file.

walPutLong open fun walPutLong(offset: Long, value: Long): Unit

Put 8 byte long into WAL.

walPutPreallocate open fun walPutPreallocate(recid: Long): Unit
walPutRecord open fun walPutRecord(recid: Long, buf: ByteArray, bufPos: Int, size: Int): Long
walPutTombstone open fun walPutTombstone(recid: Long): Unit