Home > git-documentdb > Sync
Sync class#
Synchronizer class
Signature:Constructors#
| Constructor | Modifiers | Description |
|---|---|---|
| (constructor)(gitDDB, options) | constructor |
Properties#
| Property | 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. |
Methods#
| Method | 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 |