ReplicatorConfiguration

expect class ReplicatorConfiguration(database: Database, target: Endpoint)(source)

Configuration for a Replicator

actual class ReplicatorConfiguration(val database: Database, val target: Endpoint) : DelegatedClass<<Error class: unknown class>> (source)
actual class ReplicatorConfiguration(val database: Database, val target: Endpoint)(source)

Constructors

Link copied to clipboard
expect constructor(database: Database, target: Endpoint)
expect constructor(config: ReplicatorConfiguration)
actual constructor(database: Database, target: Endpoint)
actual constructor(config: ReplicatorConfiguration)
actual constructor(database: Database, target: Endpoint)
actual constructor(config: ReplicatorConfiguration)

Types

Link copied to clipboard
expect object Companion
actual object Companion
actual object Companion

Properties

Link copied to clipboard

The Authenticator to authenticate with a remote target.

Link copied to clipboard
expect var channels: List<String>?

A set of Sync Gateway channel names to pull from. Ignored for push replication. The default value is null, meaning that all accessible channels will be pulled. Note: channels that are not accessible to the user will be ignored by Sync Gateway.

actual var channels: List<String>?
actual var channels: List<String>?
Link copied to clipboard

Return the conflict resolver.

Link copied to clipboard
expect val database: Database

Return the local database to replicate with the replication target.

actual val database: Database
actual val database: Database
Link copied to clipboard
expect var documentIDs: List<String>?

A set of document IDs to filter by: if not nil, only documents with these IDs will be pushed and/or pulled.

actual var documentIDs: List<String>?
actual var documentIDs: List<String>?
Link copied to clipboard
expect var headers: Map<String, String>?

Return Extra HTTP headers to send in all requests to the remote target.

actual var headers: Map<String, String>?
actual var headers: Map<String, String>?
Link copied to clipboard
expect var heartbeat: Int

Return the heartbeat interval, in seconds.

actual var heartbeat: Int
actual var heartbeat: Int
Link copied to clipboard

The option to remove a restriction that does not allow a replicator to accept cookies from a remote host unless the cookie domain exactly matches the domain of the sender. For instance, when the option is set to false (the default), and the remote host, “bar.foo.com”, sends a cookie for the domain “.foo.com”, the replicator will reject it. If the option is set true, however, the replicator will accept it. This is, in general, dangerous: a host might, for instance, set a cookie for the domain ".com". It is safe only when the replicator is connecting only to known hosts. The default value of this option is false: parent-domain cookies are not accepted

Link copied to clipboard

Enable/disable auto-purge. Default is enabled.

Link copied to clipboard
expect var isContinuous: Boolean

Return the continuous flag indicating whether the replicator should stay active indefinitely to replicate changed documents.

actual var isContinuous: Boolean
actual var isContinuous: Boolean
Link copied to clipboard
expect var maxAttempts: Int

Return the max number of retry attempts made after connection failure.

actual var maxAttempts: Int
actual var maxAttempts: Int
Link copied to clipboard

Return the max time between retry attempts (exponential backoff).

Link copied to clipboard

Return the remote target's SSL certificate.

Link copied to clipboard

Gets a filter object for validating whether the documents can be pulled from the remote endpoint.

Link copied to clipboard

Gets a filter object for validating whether the documents can be pushed to the remote endpoint.

Link copied to clipboard
expect val target: Endpoint

Return the replication target to replicate with.

actual val target: Endpoint
actual val target: Endpoint
Link copied to clipboard
expect var type: ReplicatorType

Return Replicator type indicating the direction of the replicator.

actual var type: ReplicatorType
actual var type: ReplicatorType

Functions

Link copied to clipboard
open operator override fun equals(other: Any?): Boolean
Link copied to clipboard
open override fun hashCode(): Int
Link copied to clipboard
fun ReplicatorConfiguration?.newConfig(database: Database? = null, target: Endpoint? = null, type: ReplicatorType? = null, continuous: Boolean? = null, authenticator: Authenticator? = null, headers: Map<String, String>? = null, pinnedServerCertificate: ByteArray? = null, channels: List<String>? = null, documentIDs: List<String>? = null, pushFilter: ReplicationFilter? = null, pullFilter: ReplicationFilter? = null, conflictResolver: ConflictResolver? = null, maxAttempts: Int? = null, maxAttemptWaitTime: Int? = null, heartbeat: Int? = null, enableAutoPurge: Boolean? = null, acceptParentDomainCookies: Boolean? = null): ReplicatorConfiguration

Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:

Link copied to clipboard

The option to remove a restriction that does not allow a replicator to accept cookies from a remote host unless the cookie domain exactly matches the domain of the sender. For instance, when the option is set to false (the default), and the remote host, “bar.foo.com”, sends a cookie for the domain “.foo.com”, the replicator will reject it. If the option is set true, however, the replicator will accept it. This is, in general, dangerous: a host might, for instance, set a cookie for the domain ".com". It is safe only when the replicator is connecting only to known hosts. The default value of this option is false: parent-domain cookies are not accepted

Link copied to clipboard

Sets the authenticator to authenticate with a remote target server. Currently, there are two types of the authenticators, BasicAuthenticator and SessionAuthenticator, supported.

Link copied to clipboard

Enable/disable auto-purge.

Link copied to clipboard

Sets a set of Sync Gateway channel names to pull from. Ignored for push replication. If unset, all accessible channels will be pulled. Note: channels that are not accessible to the user will be ignored by Sync Gateway.

Link copied to clipboard

Sets the conflict resolver.

Link copied to clipboard

Sets whether the replicator stays active indefinitely to replicate changed documents. The default value is false, which means that the replicator will stop after it finishes replicating the changed documents.

Link copied to clipboard

Sets a set of document IDs to filter by: if given, only documents with these IDs will be pushed and/or pulled.

Link copied to clipboard

Sets the extra HTTP headers to send in all requests to the remote target.

Link copied to clipboard
expect fun setHeartbeat(heartbeat: Int): ReplicatorConfiguration

Set the heartbeat interval, in seconds. Set to 0 for default values

actual fun setHeartbeat(heartbeat: Int): ReplicatorConfiguration
actual fun setHeartbeat(heartbeat: Int): ReplicatorConfiguration
Link copied to clipboard
expect fun setMaxAttempts(maxAttempts: Int): ReplicatorConfiguration

Set the max number of retry attempts made after a connection failure. Set to 0 for default values. Set to 1 for no retries.

actual fun setMaxAttempts(maxAttempts: Int): ReplicatorConfiguration
actual fun setMaxAttempts(maxAttempts: Int): ReplicatorConfiguration
Link copied to clipboard
expect fun setMaxAttemptWaitTime(maxAttemptWaitTime: Int): ReplicatorConfiguration

Set the max time between retry attempts (exponential backoff). Set to 0 for default values.

actual fun setMaxAttemptWaitTime(maxAttemptWaitTime: Int): ReplicatorConfiguration
actual fun setMaxAttemptWaitTime(maxAttemptWaitTime: Int): ReplicatorConfiguration
Link copied to clipboard

Sets the target server's SSL certificate.

Link copied to clipboard

Sets a filter object for validating whether the documents can be pulled from the remote endpoint. Only documents for which the object returns true are replicated.

Link copied to clipboard

Sets a filter object for validating whether the documents can be pushed to the remote endpoint.

Link copied to clipboard

Sets the replicator type indicating the direction of the replicator. The default value is .pushAndPull which is bi-directional.

Link copied to clipboard
open override fun toString(): String