Inherits Drop.
|
| Ditto (DittoIdentity identity=default, string workingDir=null) |
| Initializes a new instance of the Ditto class.
|
|
string | AppId () |
| Get the Ditto application Id.
|
|
void | StartSync () |
| Starts the network transports. Ditto will connect to other devices.
|
|
void | StopSync () |
| Stops all network transports.
|
|
void | SetOfflineOnlyLicenseToken (string licenseToken) |
| Activate an offline Ditto instance by setting a license token. You cannot sync with Ditto before you have activated it. The offline license token is only valid for Development, Manual, OfflinePlayground and SharedKey identities.
|
|
DittoTransportDiagnostics | TransportDiagnostics () |
| Request bulk status information about the transports. This is mostly intended for statistical or debugging purposes.
|
|
DittoPeersObserver | ObservePeers (Action< List< DittoRemotePeer > > callback) |
| Request information about Ditto peers in range of this device. This method returns an observer which should be held as long as updates are required. A newly registered observer will have a peers update delivered to it immediately. From then on it will be invoked repeatedly when Ditto devices come and go, or the active connections to them change.
|
|
void | DisableSyncWithV3 () |
| Disable sync with peers running version 3 or lower of the Ditto SDK.
|
|
void | RunGarbageCollection () |
| Removes all sync metadata for any remote peers which aren't currently connected. This method shouldn't usually be called. Manually running garbage collection often will result in slower sync times. Ditto automatically runs a garbage collection process in the background at optimal times.
|
|
|
static string | Version [get] |
| Gets a string containing the semantic version of the Ditto SDK. Example: 4.5.0.
|
|
bool | IsSyncActive [get] |
| Gets a value indicating whether or not sync is active. Use StartSync() to activate and StopSync() to deactivate sync.
|
|
bool | Activated [get] |
| Gets a value indicating whether or not the SDK has been activated.
|
|
string | DeviceName [get, set] |
| Gets or sets a custom identifier for this peer.
|
|
ulong | SiteId [get] |
| Gets the unique identifier of a peer in Ditto's distributed mesh network.
|
|
string | PersistenceDirectory [get] |
| Gets the persistence directory used by Ditto to persist data.
|
|
DittoStore | Store [get] |
| Gets a reference to the embedded data store.
|
|
DittoSync | Sync [get] |
| Gets the instance that provides access to the SDK's sync functionality.
|
|
DittoPresence | Presence [get] |
| Gets a reference to the presence manager.
|
|
DittoDiskUsage | DiskUsage [get] |
| Gets a reference to the disk usage.
|
|
string | SDKVersion [get] |
| Gets a string identifying the version of the Ditto SDK including some metadata. - See also
- Ditto.Version
|
|
DittoAuthenticator | Auth [get] |
| Gets a DittoAuthenticator that provides access to authentication information and methods for logging on to Ditto Cloud.
|
|
DittoTransportConfig | TransportConfig [get, set] |
| Gets or sets assign a new transports configuration. By default peer-to-peer transports are enabled.
|
|
DittoSmallPeerInfo | SmallPeerInfo [get] |
| Provides access to the SDK's small peer info functionality.
|
|
The entrypoint to the Ditto SDK.
For a Ditto
instance to continue to connect to other devices it must be kept in scope.
void DittoSDK.Ditto.DisableSyncWithV3 |
( |
| ) |
|
|
inline |
Disable sync with peers running version 3 or lower of the Ditto SDK.
Required for the execution of mutating DQL statements.
This setting spreads to other peers on connection. Those peers will in turn spread it further until all peers in the mesh take on the same setting. This is irreversible and will persist across restarts of the Ditto instance.
Calling this method before StartSync is recommended whenever possible. This improves performance of initial sync when this peer has never before connected to a Ditto mesh for which sync with v3 peers is disabled.
void DittoSDK.Ditto.RunGarbageCollection |
( |
| ) |
|
|
inline |
Removes all sync metadata for any remote peers which aren't currently connected. This method shouldn't usually be called. Manually running garbage collection often will result in slower sync times. Ditto automatically runs a garbage collection process in the background at optimal times.
Manually running garbage collection is typically only useful during testing if large amounts of data are being generated. Alternatively, if an entire data set is to be evicted and it's clear that maintaining this metadata isn't necessary, then garbage collection could be run after evicting the old data.
string DittoSDK.Ditto.PersistenceDirectory |
|
get |
Gets the persistence directory used by Ditto to persist data.
It is not recommended to directly read or write to this directory as its structure and contents are managed by Ditto and may change in future versions.
When DittoLogger
is enabled, logs may be written to this directory even after a Ditto instance was deallocated. Please refer to the documentation of DittoLogger for more information.