DVCaptureRuntime class abstract final

The change capture runtime of this process.

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited

Static Properties

isConfigured → bool
Whether this process configured change capture.
no setter
lag → Map<String, DVCaptureLag>
The lag each destination had at the last tick.
no setter
log → DVCapture?
The log this process writes to, or null when none is configured.
no setter
queues → List<String>
The queues this process's destinations' jobs are on, for a worker to work beside its own.
no setter
skipped → Map<String, String>
The declared destinations this process could not reach, with the code that says why.
no setter

Static Methods

configure({required DVCaptureConfig config, required DVDatabaseAdapter database, required List<DVStudioModelSpec> models, String? secret(String name)?, DVDatabaseAdapter open(String connection)?, DateTime clock()?}) → void
Configures change capture from config over database, the application's own.
resetForTest() → void
Forgets the configuration, for tests.
start({DVQueues queues = const DVQueues()}) → Future<bool>
Makes the log's collections and registers delivery and backfill on queues, in every process that configured capture: the one that dispatches and the worker that runs them both need the codecs.
startSchedules({Duration every = const Duration(seconds: 20), DVQueues queues = const DVQueues(), bool work = false}) → Timer?
tick every every. The generated server starts it in the process that ticks the application's schedules; with work, that process is the whole deployment and runs the jobs too.
tick({DVQueues queues = const DVQueues(), bool work = false}) → Future<void>
One pass of everything capture does on a schedule: changes a crash left staged are published, a destination or a data model that has never been copied is backfilled, pending changes are dispatched for delivery, lag is measured, and the log is pruned to its retention.

Constants

backoff → const Duration
How long the queue waits before trying a refused delivery again.
maxAttempts → const int
How often a delivery is tried before the queue gives up on it. The next tick dispatches another, so giving up loses nothing: the changes stay in the log until the destination takes them or retention passes.
pruneEvery → const Duration
How often the log is pruned to its retention.
queuePrefix → const String
The queue a destination's jobs go on is this, then its name, so each destination retries on its own and one that is down holds up no other.
workFor → const Duration
How long one pass may spend running jobs in a process with no worker.