SyncOptions

interface SyncOptions

SyncOptions are used to pass variable information to SyncDocument, SyncMap, SyncList and SyncStream opening functions.

Typical usage pattern: new SyncOptions().withUniqueName("myName")

Types

Link copied to clipboard
enum OpenMode
Link copied to clipboard
enum SynchronizationStrategy

Functions

Link copied to clipboard
open fun create(): SyncOptions
Public factory method to create a new instance of SyncOptions.
Link copied to clipboard
abstract fun createWithUniqueName(uniqueName: String): SyncOptions
Creates a new object with specified unique name, fails if the given name is already in use.
Link copied to clipboard
abstract fun getOpenMode(): Any
Link copied to clipboard
abstract fun getSidOrUniqueName(): String
Link copied to clipboard
abstract fun getSynchronizationStrategy(): SyncOptions.SynchronizationStrategy
Link copied to clipboard
abstract fun getTtl(): Int
Link copied to clipboard
abstract fun openWithSidOrUniqueName(sidOrUniqueName: String): SyncOptions
Opens an existing object with specified SID or unique name.
Link copied to clipboard
abstract fun withStrategy(strategy: SyncOptions.SynchronizationStrategy): SyncOptions
Set SynchronizationStrategy the Sync object.
Link copied to clipboard
abstract fun withTtl(ttl: Int): SyncOptions
Set time to live for the Sync object in seconds.
Link copied to clipboard
abstract fun withUniqueName(uniqueName: String): SyncOptions
Creates a new object or opens an existing one with provided unique name.
abstract fun withUniqueName(uniqueName: String, mode: Any): SyncOptions
Creates a new object or opens an existing one with provided unique name, also given a specific opening mode.

Properties

Link copied to clipboard
val INFINITE_DURATION: Int
Time to live for a Sync object, specifying no expiry.