Reach enum

Describes how far reads/writes should reach before they are good enough.

The possible values are:

  • Reach.local - The local cache. You get the best resiliency (and best reading/writing latency), but risk of inconsistent state is high.
  • Reach.server - The fastest (cloud) database or search engine. Often diverges from the regional master database. For example, it's usual for search engine clusters to take seconds or minutes before they have indexed changes in the regional master.
  • Reach.regional - The regional master. May diverge from the global master database during (extremely rare) network partitions.
  • Reach.global - The global master. You get the worst resiliency and best possible consistency.

Example:

final snapshot = await document.get(reach: Reach.local);

Constants

global → const Reach

Global master database.

const Reach(3)
local → const Reach

Local cache.

const Reach(0)
regional → const Reach

Regional master database.

const Reach(2)
server → const Reach

The fastest cloud database or search engine.

const Reach(1)
values → const List<Reach>

A constant List of the values in this enum, in order of their declaration.

const List<Reach>

Properties

hashCode int
The hash code for this object. [...]
read-only, inherited
index int

The integer index of this enum.

final
runtimeType Type
A representation of the runtime type of the object.
read-only, inherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a non-existent method or property is accessed. [...]
inherited
toString() String
Returns a string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator. [...]
inherited