InstantDocumentState

Lists the observable states of an Instant document and its sync cycle.

The term “sync cycle” refers to the repetitive transitions between the states “receiving changes” and “sending changes” until there are no unsynced local changes remaining. If you are using automatic sync, a sync cycle will begin delayed after the last change to an annotation of the document. New sync cycle can also be triggered by changes coming in from the server when listening for server changes.

When not listening for server changes and with automatic sync of local changes disabled, a sync cycle starts whenever you call syncAnnotations.

Entries

Link copied to clipboard

Document is in an unknown state. This goes away by the time you access a downloaded document for the first time.

Link copied to clipboard

The current database version does not include required metadata on at least some records. The database will be usable in read-only mode until the local data has been replaced with an up-to-date snapshot from the server. Any pre-existing local changes will be sent to the server in the process. See "resetting for database migration".

Link copied to clipboard

The layer's record store is being updated with the latest server version. The database will be usable in read-only mode until this process completes. Any pre-existing local changes will be sent to the server before the local record store is purged. Upon success, we transition to state "clean".

Link copied to clipboard

The document is valid and has no local changes.

Link copied to clipboard

The document is valid but has local changes that have not been synced to the server.

Link copied to clipboard

The document is busy syncing — currently sending its local changes to the server.

Link copied to clipboard

The document is busy syncing — currently receiving changes from the server.

Link copied to clipboard

The document is invalid and cannot be used any longer.

Functions

Link copied to clipboard

Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Link copied to clipboard

Returns an array containing the constants of this enum type, in the order they're declared. This method may be used to iterate over the constants.