ReadOnlyLocalLog

class ReadOnlyLocalLog<M>(rootPath: Path, codec: MessageCodec<M>, val epoch: Int, coroutineContext: CoroutineContext = Dispatchers.Default, logFileName: String = "LOG") : Log<M>

A read-only version of LocalLog that watches the log file for new messages written by another process (the primary cluster).

Constructors

Link copied to clipboard
constructor(rootPath: Path, codec: MessageCodec<M>, epoch: Int, coroutineContext: CoroutineContext = Dispatchers.Default, logFileName: String = "LOG")

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open override val epoch: Int
Link copied to clipboard
Link copied to clipboard
open override val latestSubmittedOffset: LogOffset

Functions

Link copied to clipboard
open suspend override fun appendMessage(message: M): Log.MessageMetadata
Link copied to clipboard
Link copied to clipboard
open override fun close()
Link copied to clipboard
open override fun openAtomicProducer(transactionalId: String): Nothing
Link copied to clipboard
open suspend override fun openGroupSubscription(listener: Log.SubscriptionListener<M>)
Link copied to clipboard
open override fun readLastMessage(): M?
Link copied to clipboard
open override fun readRecords(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.

Link copied to clipboard
open suspend override fun tailAll(afterMsgId: MessageId, processor: Log.RecordProcessor<M>)