DevtoolsActions class final
Panel actions over one cache.
Constructors
- DevtoolsActions(DevCache _cache, EventLog _log, int _session(), bool _answerable())
-
Creates the action layer.
sessionis read at each call, because an identity change increments it.answerableis the inspector's own check that the cache can be asked something right now: it is false while the cache changes principal and after the inspector is disposed.
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
-
clear(
) → void - Drops every entity, skeleton and registry entry. The cache keeps a sync source's records through a clear, so owned entities survive this.
-
drop(
String key) → bool - Forgets this query, or resets it if watched.
-
ensureReady(
) → void - Throws a StateError unless the cache can be acted on now: not while it is changing principal, and not once the inspector is detached. A caller that starts work it does not wait for checks this first, so a refusal reaches it instead of being lost with the work.
-
evict(
String entityKey) → bool - Drops one entity record. False when the store does not hold it. Refused for an owned entity.
-
forceStale(
String key) → bool - Marks exactly one query stale without raising its tags.
-
hold(
String key, String state) → void -
Records that the panel is holding a query in a state. Nothing moves, and
keyis only a label: it is not resolved against the cache. -
invalidate(
String key) → bool - Raises the tags this query carries. Refused when any of them names an owned entity type.
-
invalidateTag(
String tag) → void - Raises one tag by hand. Refused when it names an owned entity type.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
patchEntity(
String key, Map< String, Object?> fields) → int - Pushes a hand-written field change onto the overlay stack and returns the layer id, for the undo. Refused for an owned entity.
-
promote(
int id) → bool - Commits one optimistic layer to the base store by hand. Refused when the layer touches an owned entity; the layer stays on the stack.
-
refetch(
String key) → Future< Object?> -
Runs this query again whatever the cache holds. Fails when nothing
tracks
key, and while the cache is changing principal. -
release(
String key) → void -
Records the release of a held query.
keyis only a label. -
rollback(
int id) → bool - Takes one optimistic layer off the stack. Removal, not an inverse: it writes nothing to the store, so it is allowed for any layer.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited