|
Ditto 4.13.1
|
Provides access to sync related functionality of Ditto. More...
Public Member Functions | |
| void | Start () |
| Starts all network transports. | |
| void | Stop () |
| Stops all network transports. | |
| DittoSyncSubscription | RegisterSubscription (string query, Dictionary< string, object > arguments=default) |
| Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other peers for documents matching that query. The passed in query must be a SELECT query, otherwise a DittoQueryNotSupportedException will be thrown. | |
Protected Member Functions | |
| override void | Dispose (bool disposing) |
Properties | |
| IReadOnlyCollection< DittoSyncSubscription > | Subscriptions [get] |
| Gets all currently active sync subscriptions. | |
| bool | IsActive [get] |
Gets a value indicating whether or not sync is active. Use Start() to activate and Stop() to deactivate sync. | |
Provides access to sync related functionality of Ditto.
|
inline |
Installs and returns a sync subscription for a query, configuring Ditto to receive updates from other peers for documents matching that query. The passed in query must be a SELECT query, otherwise a DittoQueryNotSupportedException will be thrown.
| query | A string containing a valid query expressed in DQL. |
| arguments | A dictionary of values keyed by the placeholder name without the leading : Example: new Dictionary<string, object>() { { "mileage" , 123 } }
|
| DittoStoreException | Can throw a DittoStoreException. For more granular exception handling check the following subtypes:
|
|
inline |
Starts all network transports.
The default network configuration can be modified via Ditto.TransportConfig
Performance of initial sync when bootstrapping a new peer can be improved by calling Ditto.DisableSyncWithV3 before calling Start. Only do this when all peers in the mesh are known to be running Ditto v4 or higher.
| DittoException | Thrown if the Ditto instance hasn't been activated by a successful call to SetOfflineOnlyLicenseToken. |
|
inline |
Stops all network transports.
You may continue to use the Ditto store locally but no data will sync to or from other devices.