Recorder class abstract

The sink that accessors report to while a build is being recorded.

Implemented by the runtime (QueryScope, CacheScope, the mutation recorder); generated code only passes one through to Accessor's constructor. Apps never implement or call it.

There is exactly one recorder per operation per build scope (a widget build, a prepare call, …). It knows the operation type, holds the selection tree recorded so far, and is told about every cache miss.

Implementers

Constructors

Recorder()

Properties

cache → Cache
no setter
deps → Set<String>
Dependency keys (entity.field, entity.field[2] for an inline list element — see depKey) read so far in the current scope. Filled by the cache on every read; used to decide which scopes to rebuild when data changes.
no setter
hashCode → int
The hash code for this object.
no setterinherited
operation → String
query, mutation or subscription.
no setter
root → Selection
Root of the selection tree recorded in the current scope.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
typePolicies → Map<Type, TypePolicy>
The client's field policies (SlingClient.typePolicies), keyed by the generated accessor class a field is read through.
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
onMiss(Selection leaf) → void
Called when a field was read but is not in the cache. For object and list fields the node itself is reported (its children come as the skeleton accessors are read).
onWrite(CacheWrite write) → void
Called on manual writes (generated setters) so dependants can be re-rendered and, during a mutation's optimistic phase, so the write can be undone if the mutation fails.
toString() → String
A string representation of this object.
inherited

Operators

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