LocalLog
class LocalLog<M> @JvmOverloads constructor(rootPath: Path, codec: MessageCodec<M>, instantSource: InstantSource, val epoch: Int, val useInstantSourceForNonTx: Boolean, coroutineContext: CoroutineContext = Dispatchers.IO, baseFileName: String = "LOG", val partitions: Int = 1) : Log<M>
Constructors
Link copied to clipboard
constructor(rootPath: Path, codec: MessageCodec<M>, instantSource: InstantSource, epoch: Int, useInstantSourceForNonTx: Boolean, coroutineContext: CoroutineContext = Dispatchers.IO, baseFileName: String = "LOG", partitions: Int = 1)
Types
Link copied to clipboard
@SerialName(value = "!Local")
@Serializable
Used to set configuration options for a local directory based XTDB Log.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open suspend override fun enqueueMessage(message: M, partition: Int = 0): Deferred<Log.MessageMetadata>
Appends message, returning once its place in this partition's order is fixed - the Deferred completes with its offset once it is durable.
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun readRecords(partition: Int, fromMsgId: MessageId, toMsgId: MessageId): Sequence<Log.Record<M>>
Reads records in the range [fromMsgId, toMsgId) (start-inclusive, end-exclusive). Returns a lazy sequence of decoded records in offset order. If toMsgId exceeds the latest submitted offset, reads up to the latest available record.