DVProtocolPlan class

The plan for every version in the window, built eagerly from the lockfile.

Built for every served version up front rather than per observed client: an adaptation derived in response to a request from a stale client runs along a path no test ever ran. The set is bounded by the window, and every lossy change without a declared adapter is a finding here, before anything is served.

Constructors

DVProtocolPlan.build({required DVProtocolLock lock, DVProtocolWindow window = const DVProtocolWindow(), required DateTime now, List<DVProtocolAdapter> adapters = const <DVProtocolAdapter>[], void onDiagnostic(String code, String message)?})
factory

Properties

current → int
The backend's protocol version.
final
errors → List<DVProtocolProblem>
DV-PROTO-004 findings. A build with any fails.
final
hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
versions → Map<int, DVProtocolVersionPlan>
Every served version, keyed by protocol.
final
warnings → List<DVProtocolProblem>
DV-PROTO-006 findings.
final

Methods

adapterFor(int client) → DVProtocolAdapterSet?
The adapters for a degraded client, or null when it needs none (it is current) or is served nothing (it must upgrade).
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
resultFor(int client) → DVProtocolResult?
What a client on client gets, or null when it is ahead of this backend -- a state the backend cannot adapt to, because the shape it would need to produce is one it has never seen.
toString() → String
A string representation of this object.
inherited

Operators

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