MemoryCloudSaves class final

A CloudSaveStore in memory, for a test of what syncs and what is kept: one place, shared by however many devices a test plays.

Versions as a real store keeps them. Each copy gets a new version when it is written, and a write naming a version that is no longer the copy's — or naming none where a copy already is — answers CloudMoved and keeps nothing, so two devices racing to sync are caught here as they are by Play Games or an ETag. writeElsewhere is the other device. unavailable, when set, answers every call with CloudUnavailable, as a network that is down does; nothing here throws.

Inheritance

Constructors

MemoryCloudSaves({String name = 'the test cloud'})
A store called name, empty.

Properties

hashCode → int
The hash code for this object.
no setterinherited
name → String
The store's name as a player knows it — "Play Games", "iCloud" — for the sentences a sync answers with.
final
puts → List<CloudPutRequest>
Every write asked of the store, kept or not, oldest first.
no setter
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
unavailable ↔ String?
Why the store cannot be reached; null when it can. Settable.
getter/setter pair

Methods

copyOf(String slot) → CloudDocument?
The copy kept under slot, or null.
fetch(CloudFetchRequest request) → Future<CloudFetch>
The copy kept under the request's slot, if there is one.
override
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
put(CloudPutRequest request) → Future<CloudPut>
Keeps the request's document under its slot in place of the copy at CloudPutRequest.replacing, or only if there is no copy at all when that is null.
override
toString() → String
A string representation of this object.
inherited
writeElsewhere(String slot, String document) → CloudDocument
Writes document under slot as another device would, moving the copy's version past whatever this device last saw.

Operators

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