newConfig

fun CollectionConfiguration?.newConfig(channels: List<String>? = null, documentIDs: List<String>? = null, pullFilter: ReplicationFilter? = null, pushFilter: ReplicationFilter? = null, conflictResolver: ConflictResolver? = null): CollectionConfiguration(source)

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

Parameters

channels

Sync Gateway channel names.

documentIDs

IDs of documents to be replicated: default is all documents.

pullFilter

filter for pulled documents.

pushFilter

filter for pushed documents.

conflictResolver

conflict resolver.

See also


fun FullTextIndexConfiguration?.newConfig(vararg expressions: String = emptyArray(), language: String? = null, ignoreAccents: Boolean? = null): FullTextIndexConfiguration(source)

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

Parameters

expressions

(required) the expressions to be matched.

See also


fun ValueIndexConfiguration?.newConfig(vararg expressions: String = emptyArray()): ValueIndexConfiguration(source)

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

Parameters

expressions

(required) the expressions to be matched.

See also


fun LogFileConfiguration?.newConfig(directory: String? = null, maxSize: Long? = null, maxRotateCount: Int? = null, usePlainText: Boolean? = null): LogFileConfiguration(source)

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

Parameters

directory

(required) the directory in which the logs files are stored.

maxSize

the max size of the log file in bytes.

maxRotateCount

the number of rotated logs that are saved.

usePlainText

whether or not to log in plaintext.

See also


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

Parameters

databasePath

The directory in which the database is stored.

See also


fun ReplicatorConfiguration?.newConfig(target: Endpoint? = null, collections: Map<out Collection<Collection>, CollectionConfiguration?>? = null, type: ReplicatorType? = null, continuous: Boolean? = null, authenticator: Authenticator? = null, headers: Map<String, String>? = null, pinnedServerCertificate: ByteArray? = null, maxAttempts: Int? = null, maxAttemptWaitTime: Int? = null, heartbeat: Int? = null, enableAutoPurge: Boolean? = null, acceptParentDomainCookies: Boolean? = null): ReplicatorConfiguration(source)

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

Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge property

Parameters

target

(required) The replication endpoint.

collections

a map of collections to be replicated, to their configurations.

type

replicator type: push, pull, or push and pull: default is push and pull.

continuous

continuous flag: true for continuous, false by default.

authenticator

connection authenticator.

headers

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

pinnedServerCertificate

target server's SSL certificate.

maxAttempts

max retry attempts after connection failure.

maxAttemptWaitTime

max time between retry attempts (exponential backoff).

heartbeat

heartbeat interval, in seconds.

enableAutoPurge

auto-purge enabled.

acceptParentDomainCookies

Advanced: accept cookies for parent domains.

See also


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(source)

Deprecated

Use ReplicatorConfigurationFactory.newConfig(Endpoint?, Map<Set<Collection>, CollectionConfiguration?>?, ...)

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

Note: A document that is blocked by a document Id filter will not be auto-purged regardless of the setting of the enableAutoPurge property

Warning: This factory method configures only the default collection! Using it on a configuration that describes any collections other than the default will lose all information associated with those collections

Parameters

database

the local database.

target

(required) The replication endpoint.

type

replicator type: push, pull, or push and pull: default is push and pull.

continuous

continuous flag: true for continuous, false by default.

authenticator

connection authenticator.

headers

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

pinnedServerCertificate

target server's SSL certificate.

channels

Sync Gateway channel names.

documentIDs

IDs of documents to be replicated: default is all documents.

pushFilter

filter for pushed documents.

pullFilter

filter for pulled documents.

conflictResolver

conflict resolver.

maxAttempts

max retry attempts after connection failure.

maxAttemptWaitTime

max time between retry attempts (exponential backoff).

heartbeat

heartbeat interval, in seconds.

enableAutoPurge

auto-purge enabled.

acceptParentDomainCookies

Advanced: accept cookies for parent domains.

See also