ReplicatorConfiguration
Configuration for a Replicator
Constructors
Types
Properties
The Authenticator used to authenticate the remote.
The list of collections in the replicator configuration
The conflict resolver.
A collection of document IDs to filter: if not null, only documents with these IDs will be pushed and/or pulled.
ENTERPRISE EDITION API
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
Enable/disable auto-purge. Default is enabled.
The continuous flag indicating whether the replicator should stay active indefinitely to replicate changed documents.
The max number of retry attempts made after connection failure. This method will return 0 when implicitly using the default: 10 total connection attempts (the initial attempt and up to 9 retries) for a one-shot replicator and a very, very large number of retries, for a continuous replicator.
The max time between retry attempts (exponential backoff).
The remote target's SSL certificate.
The remote target’s SSL certificate.
The remote target's SSL certificate.
The filter used to determine whether a document will be pulled from the remote endpoint.
The filter used to determine whether a document will be pushed to the remote endpoint.
Replicator type indicating the direction of the replicator.
Functions
Add a collection used for the replication with an optional collection configuration. If the collection has been added before, the previously added collection and its configuration if specified will be replaced.
Add multiple collections used for the replication with an optional shared collection configuration. If any of the collections have been added before, the previously added collections and their configuration if specified will be replaced. Adding an empty collection array is a no-op.
Get the CollectionConfiguration for the passed Collection.
Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters.
Create a ReplicatorConfiguration, overriding the receiver's values with the passed parameters:
Remove a collection from the replication.
ENTERPRISE EDITION API
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
Sets the authenticator to authenticate with a remote target server. Currently, there are two types of the authenticators, BasicAuthenticator and SessionAuthenticator, supported. The default is no authenticator.
Enable/disable auto-purge. The default is auto-purge enabled.
Sets a collection of Sync Gateway channel names from which to pull Documents. If unset, all accessible channels will be pulled. Default is empty: pull from all accessible channels.
Sets the conflict resolver. Default is ReplicatorConfiguration.DEFAULT_CONFLICT_RESOLVER
Sets whether the replicator stays active indefinitely to replicate changed documents. The default is false: the replicator will stop after it finishes replicating changed documents.
A collection of document IDs identifying documents to be replicated. If non-empty, only documents with IDs in this collection will be pushed and/or pulled. Default is empty: do not filter documents.
Sets the extra HTTP headers to send in all requests to the remote target. The default is no extra headers.
Set the heartbeat interval, in seconds. The default is 5 minutes (300 seconds). Setting the parameter to 0 will restore the default.
Set the max number of retry attempts made after a connection failure. Set to 1 for no retries and to 0 to restore default behavior. The default is 10 total connection attempts (the initial attempt and up to 9 retries) for a one-shot replicator and a very, very large number of retries, for a continuous replicator.
Set the max time between retry attempts, in seconds. Time between retries is initially small but backs off exponentially up to this limit. Once the limit is reached the interval between subsequent attempts will be the value set here, until max-attempts attempts have been made. The minimum value legal value is 1 second. The default is 5 minutes (300 seconds). Setting the parameter to 0 will restore the default.
Sets the certificate used to authenticate the target server. A server will be authenticated if it presents a chain of certificates (possibly of length 1) in which any one of the certificates matches the one passed here. The default is no pinned certificate.
Sets the certificate used to authenticate the target server. A server will be authenticated if it presents a chain of certificates (possibly of length 1) in which any one of the certificates matches the one passed here. The default is no pinned certificate.
Sets the certificate used to authenticate the target server. A server will be authenticated if it presents a chain of certificates (possibly of length 1) in which any one of the certificates matches the one passed here. The default is no pinned certificate.
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. Default is no filter.
Sets a filter object for validating whether the documents can be pushed to the remote endpoint. Default is no filter.
Sets the replicator type indicating the direction of the replicator. The default is ReplicatorType.PUSH_AND_PULL: bi-directional replication.