Skip to main content

Home > git-documentdb > Sync

Sync class#

Synchronizer class

Signature:
export declare class Sync implements SyncInterface
Implements:

SyncInterface

Constructors#

ConstructorModifiersDescription
(constructor)(gitDDB, options)constructor

Properties#

PropertyModifiersTypeDescription
enginestring
jsonDiffJsonDiffJsonDiff
jsonPatchJsonPatchOTJsonPatch
optionsRequired<RemoteOptions >Get a clone of remote options
remoteNamestringremoteName
remoteRepositoryRemoteRepositoryRemote repository
remoteURLstringremoteURL
runBeforeLiveSync(() => void) | undefinedrunBeforeLiveSync This function is executed just before each automated(live) synchronization event is queued. Set undefined to stop it.

Methods#

MethodModifiersDescription
close()Stop and clear remote connection
currentRetries()Return current retry count (incremental)
enqueueSyncTask(calledAsPeriodicTask)Enqueue sync task to TaskQueue
init()Initialize remote connection
off(event, callback)Remove SyncEvent handler
on(event, callback, collectionPath)Add SyncEvent handler
pause()Pause synchronization
resume(options)Resume synchronization
tryPush()Try to push
trySync()Try to sync with retries