SnapshotOptions

class SnapshotOptions @InternalWowApi constructor(val maintenanceInterval: Duration = DEFAULT_MAINTENANCE_INTERVAL, val rebuildPageSize: Int = DEFAULT_REBUILD_PAGE_SIZE, val rebuildMaxPages: Int = DEFAULT_REBUILD_MAX_PAGES, val leaseTtl: Duration = DEFAULT_TTL, val memberTtl: Duration = DEFAULT_TTL, val writeBatch: Int = DEFAULT_WRITE_BATCH, val loadTimeout: Duration = KernelOptions.DEFAULT_SNAPSHOT_LOAD_TIMEOUT, val writesInFlight: Int? = null)

The tuning of each context's SnapshotMaintenance: it runs every maintenanceInterval; an in-place rebuild rewrites rebuildPageSize snapshots a page, at most rebuildMaxPages pages a run, under a lease of leaseTtl; a node is a member of its state revision from when it is ready to join until it stops, heartbeated every third of memberTtl whatever its runs take, and stays one for memberTtl after its last heartbeat, so a rollback waits up to that long after the last node of the higher revision is gone (none when it leaves gracefully). A node on standby has its prepare's one heartbeat only: memberTtl after its start, a node of a lower revision rolls its claim back. The snapshot subscriptions write at most writeBatch snapshots of a partition with one me.ahoo.wow.spi.snapshot.SnapshotStore.saveAll. A command's cache miss, and a shared state's, waits at most loadTimeout for a snapshot before it replays the log (me.ahoo.wow.kernel.KernelOptions.snapshotLoadTimeout). With writesInFlight, the subscriptions run that many writes at once over the store's own me.ahoo.wow.spi.snapshot.SnapshotStore.writesInFlight: a seam for measuring the count, bound to no configuration and internal like the constructor; null, the store's. Once the writes follow their backlog it fixes the count, steady and behind alike.

Fields may be added: Wow builds it from the host's configuration, so the constructor is internal to Wow.

Constructors

Link copied to clipboard
constructor(maintenanceInterval: Duration = DEFAULT_MAINTENANCE_INTERVAL, rebuildPageSize: Int = DEFAULT_REBUILD_PAGE_SIZE, rebuildMaxPages: Int = DEFAULT_REBUILD_MAX_PAGES, leaseTtl: Duration = DEFAULT_TTL, memberTtl: Duration = DEFAULT_TTL, writeBatch: Int = DEFAULT_WRITE_BATCH, loadTimeout: Duration = KernelOptions.DEFAULT_SNAPSHOT_LOAD_TIMEOUT, writesInFlight: Int? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
open override fun toString(): String