Home > git-documentdb > Sync
#
Sync classSynchronizer class
Signature:#
ConstructorsConstructor | Modifiers | Description |
---|---|---|
(constructor)(gitDDB, options) | constructor |
#
PropertiesProperty | Modifiers | Type | Description |
---|---|---|---|
engine | string | ||
jsonDiff | JsonDiff | JsonDiff | |
jsonPatch | JsonPatchOT | JsonPatch | |
options | Required<RemoteOptions > | Get a clone of remote options | |
remoteName | string | remoteName | |
remoteRepository | RemoteRepository | Remote repository | |
remoteURL | string | remoteURL | |
runBeforeLiveSync | (() => void) | undefined | runBeforeLiveSync This function is executed just before each automated(live) synchronization event is queued. Set undefined to stop it. |
#
MethodsMethod | Modifiers | Description |
---|---|---|
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 |