Factory

@SerialName(value = "!Local")
@Serializable
data class Factory @JvmOverloads constructor(val path: Path, var instantSource: InstantSource = InstantSource.system(), var epoch: Int = 0, var termEpoch: Int = 0, var useInstantSourceForNonTx: Boolean = false, var coroutineContext: CoroutineContext = Dispatchers.IO) : Log.Factory

Used to set configuration options for a local directory based XTDB Log.

Example usage, as part of a node config:

Xtdb.openNode {
log = localLog(Path("test-path")) {
instantSource = InstantSource.system()
bufferSize = 4096
pollSleepDuration = Duration.ofMillis(100)
}
...
}

Constructors

Link copied to clipboard
constructor(path: Path, instantSource: InstantSource = InstantSource.system(), epoch: Int = 0, termEpoch: Int = 0, useInstantSourceForNonTx: Boolean = false, coroutineContext: CoroutineContext = Dispatchers.IO)

Properties

Link copied to clipboard
Link copied to clipboard
var epoch: Int
Link copied to clipboard
Link copied to clipboard
val path: Path
Link copied to clipboard

Declares that the leader-election counter behind this log has been reset, so that terms from before the reset still order below terms from after it. Bump it — never lower it — whenever that happens; a node that finds its own term already fenced on the replica log refuses to lead and names this setting. See LeaderTerm.

Functions

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override fun openReadOnlyReplicaLog(remotes: Map<RemoteAlias, Remote>, partitions: Int = 1): ReadOnlyLocalLog<ReplicaMessage>
Link copied to clipboard
open override fun openReadOnlySourceLog(remotes: Map<RemoteAlias, Remote>, partitions: Int = 1): ReadOnlyLocalLog<SourceMessage>
Link copied to clipboard
open override fun openReplicaLog(remotes: Map<RemoteAlias, Remote>, partitions: Int = 1): LocalLog<ReplicaMessage>
Link copied to clipboard
open override fun openSourceLog(remotes: Map<RemoteAlias, Remote>, partitions: Int = 1): LocalLog<SourceMessage>
Link copied to clipboard
fun termEpoch(termEpoch: Int): LocalLog.Factory
Link copied to clipboard
open override fun writeTo(dbConfig: DatabaseConfig.Builder)