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

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


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)

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

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

database

(required) the local database.

target

(required) The max size of the log file in bytes.

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