newConfig

fun DatabaseConfiguration?.newConfig(databasePath: String? = null, encryptionKey: EncryptionKey? = null): DatabaseConfiguration(source)

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

Parameters

databasePath

The directory in which the database is stored.

encryptionKey

ENTERPRISE EDITION API: The database encryption key.

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, acceptOnlySelfSignedServerCertificate: 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 max size of the log file in bytes.

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.

acceptOnlySelfSignedServerCertificate

ENTERPRISE EDITION API: Whether the replicator will accept all/only self-signed certificates.

acceptParentDomainCookies

Advanced: accept cookies for parent domains.

See also


ENTERPRISE EDITION API

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

Parameters

collections

the local collections.

protocolType

(required) data transport type: messages or bytes.

See also


fun URLEndpointListenerConfiguration?.newConfig(collections: Set<Collection>? = null, networkInterface: String? = null, port: Int? = null, disableTls: Boolean? = null, identity: TLSIdentity? = null, authenticator: ListenerAuthenticator? = null, readOnly: Boolean? = null, enableDeltaSync: Boolean? = null): URLEndpointListenerConfiguration(source)

ENTERPRISE EDITION API

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

Parameters

collections

the local collection.

networkInterface

the interface on which to listen: default is 0.0.0.0.

port

listener port: default is next available port.

disableTls

true to disable TLS: default is false.

identity

certs and keys for the listener.

authenticator

authenticator.

readOnly

true for a read-only connection.

enableDeltaSync

true to enable delta sync.

See also


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, acceptOnlySelfSignedServerCertificate: 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.

acceptOnlySelfSignedServerCertificate

ENTERPRISE EDITION API: Whether the replicator will accept all/only self-signed certificates.

acceptParentDomainCookies

Advanced: accept cookies for parent domains.

See also


Deprecated

Use MessageEndpointListenerConfigurationFactory().newConfig(Endpoint?, Set<Collection>?)

ENTERPRISE EDITION API

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

Parameters

database

the local database.

protocolType

(required) data transport type: messages or bytes.

See also


fun URLEndpointListenerConfiguration?.newConfig(database: Database? = null, networkInterface: String? = null, port: Int? = null, disableTls: Boolean? = null, identity: TLSIdentity? = null, authenticator: ListenerAuthenticator? = null, readOnly: Boolean? = null, enableDeltaSync: Boolean? = null): URLEndpointListenerConfiguration(source)

Deprecated

Use URLEndpointListenerConfigurations().newConfig(Set<Collection>?, ...)

ENTERPRISE EDITION API

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

Parameters

database

the local database.

networkInterface

the interface on which to listen: default is 0.0.0.0.

port

listener port: default is next available port.

disableTls

true to disable TLS: default is false.

identity

certs and keys for the listener.

authenticator

authenticator.

readOnly

true for a read-only connection.

enableDeltaSync

true to enable delta sync.

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