Other Classes
The following classes are available globally.
-
Entrypoint for accessing information about the amount of disk storage used by Ditto. This class can’t be instantiated. You can access an instance through the
See moreditto.diskUsage
API.Declaration
Swift
public class DiskUsage
-
Contains information about a remote peer that has requested a connection.
Connection requests and their authorization are scoped to a specific Ditto peer and connection type.
See moreDeclaration
Swift
public class DittoConnectionRequest
extension DittoConnectionRequest: CustomStringConvertible
-
An observation token returned by any observation API in the Ditto SDK. Retain this object to continue receiving updates.
See moreDeclaration
Swift
public class DittoObserver
-
The entrypoint for small peer user info collection. Small peer info consists of information gathered into a system collection on a regular interval and optionally synced to the Big Peer for device dashboard and debugging purposes.
You don’t create this class directly, but can access it from a particular
See moreDitto
instance via itssmallPeerInfo
property.Declaration
Swift
public class DittoSmallPeerInfo
-
Provides access to sync related functionality of Ditto.
See moreDeclaration
Swift
public class DittoSync
-
Represents a CRDT counter that can be upserted as part of a document or assigned to a property during an update of a document.
See moreDeclaration
Swift
public class DittoCounter
extension DittoCounter: Equatable
-
Represents a mutable CRDT counter that can be incremented by a specific amount while updating a document.
This class can’t be instantiated directly, it’s returned automatically for any counter property within an update block.
See also the
See morecounter
properties ofDittoDocumentPath
andDittoMutableDocumentPath
.Declaration
Swift
public class DittoMutableCounter : DittoCounter
-
Represents a mutable CRDT register that can be updated while updating a document.
This class can’t be instantiated directly. It’s returned automatically for any register property within an update block.
See also the
See moreregister
property ofDittoMutableDocumentPath
.Declaration
Swift
public class DittoMutableRegister
-
Represents a CRDT register that can be upserted as part of a document or assigned to a property during an update of a document.
See moreDeclaration
Swift
public class DittoRegister
-
A store observer invokes an observation handler whenever results for its query change.
Create a store observer by calling
See moreDittoStore.registerObserver()
. The store observer will remain active until the owningDitto
object goes out of scope orDittoStoreObserver.cancel()
is called.Declaration
Swift
public class DittoStoreObserver
extension DittoStoreObserver: Hashable
extension DittoStoreObserver: Equatable
-
A sync subscription configures Ditto to receive updates from remote peers about documents matching the subscription’s query.
Create a sync subscription by calling
See moreDittoSync.registerSubscription()
. The subscription will remain active until either explicitly cancelled viaDittoSyncSubscription.cancel()
or the owningDitto
object goes out of scope.Declaration
Swift
public class DittoSyncSubscription
extension DittoSyncSubscription: Hashable
extension DittoSyncSubscription: Equatable