public final class ReplicatorConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
com.couchbase.lite.AbstractReplicatorConfiguration.ReplicatorType
Replicator type
PUSH_AND_PULL: Bidirectional; both push and pull
PUSH: Pushing changes to the target
PULL: Pulling changes from the target
|
Constructor and Description |
---|
ReplicatorConfiguration(Database database,
Endpoint target) |
ReplicatorConfiguration(ReplicatorConfiguration config) |
Modifier and Type | Method and Description |
---|---|
Authenticator |
getAuthenticator()
Return the Authenticator to authenticate with a remote target.
|
List<String> |
getChannels()
A set of Sync Gateway channel names to pull from.
|
ConflictResolver |
getConflictResolver()
Return the conflict resolver.
|
Database |
getDatabase()
Return the local database to replicate with the replication target.
|
List<String> |
getDocumentIDs()
A set of document IDs to filter by: if not nil, only documents with these IDs will be pushed
and/or pulled.
|
Map<String,String> |
getHeaders()
Return Extra HTTP headers to send in all requests to the remote target.
|
byte[] |
getPinnedServerCertificate()
Return the remote target's SSL certificate.
|
ReplicationFilter |
getPullFilter()
Gets a filter object for validating whether the documents can be pulled
from the remote endpoint.
|
ReplicationFilter |
getPushFilter()
Gets a filter object for validating whether the documents can be pushed
to the remote endpoint.
|
com.couchbase.lite.AbstractReplicatorConfiguration.ReplicatorType |
getReplicatorType()
Return Replicator type indicating the direction of the replicator.
|
Endpoint |
getTarget()
Return the replication target to replicate with.
|
boolean |
isAcceptOnlySelfSignedServerCertificate()
Return whether the replicator will accept any and only self-signed server certificates.
|
boolean |
isContinuous()
Return the continuous flag indicating whether the replicator should stay
active indefinitely to replicate changed documents.
|
ReplicatorConfiguration |
setAcceptOnlySelfSignedServerCertificate(boolean acceptOnlySelfSignedServerCertificate)
Specify whether the replicator will accept any and only self-signed certificates.
|
ReplicatorConfiguration |
setAuthenticator(Authenticator authenticator)
Sets the authenticator to authenticate with a remote target server.
|
ReplicatorConfiguration |
setChannels(List<String> channels)
Sets a set of Sync Gateway channel names to pull from.
|
ReplicatorConfiguration |
setConflictResolver(ConflictResolver conflictResolver)
Sets the the conflict resolver.
|
ReplicatorConfiguration |
setContinuous(boolean continuous)
Sets whether the replicator stays active indefinitely to replicate
changed documents.
|
ReplicatorConfiguration |
setDocumentIDs(List<String> documentIDs)
Sets a set of document IDs to filter by: if given, only documents
with these IDs will be pushed and/or pulled.
|
ReplicatorConfiguration |
setHeaders(Map<String,String> headers)
Sets the extra HTTP headers to send in all requests to the remote target.
|
ReplicatorConfiguration |
setPinnedServerCertificate(byte[] pinnedCert)
Sets the target server's SSL certificate.
|
ReplicatorConfiguration |
setPullFilter(ReplicationFilter pullFilter)
Sets a filter object for validating whether the documents can be pulled from the
remote endpoint.
|
ReplicatorConfiguration |
setPushFilter(ReplicationFilter pushFilter)
Sets a filter object for validating whether the documents can be pushed
to the remote endpoint.
|
ReplicatorConfiguration |
setReplicatorType(com.couchbase.lite.AbstractReplicatorConfiguration.ReplicatorType replicatorType)
Sets the replicator type indicating the direction of the replicator.
|
String |
toString() |
public ReplicatorConfiguration(@NonNull ReplicatorConfiguration config)
@NonNull public ReplicatorConfiguration setAcceptOnlySelfSignedServerCertificate(boolean acceptOnlySelfSignedServerCertificate)
acceptOnlySelfSignedServerCertificate
- Whether the replicator will accept
any and only self-signed certificates.@NonNull public boolean isAcceptOnlySelfSignedServerCertificate()
@NonNull public final ReplicatorConfiguration setAuthenticator(@NonNull Authenticator authenticator)
authenticator
- The authenticator.@NonNull public final ReplicatorConfiguration setChannels(@Nullable List<String> channels)
channels
- The Sync Gateway channel names.@Nullable public final ReplicatorConfiguration setConflictResolver(@Nullable ConflictResolver conflictResolver)
conflictResolver
- The replicator type.@NonNull public final ReplicatorConfiguration setContinuous(boolean continuous)
continuous
- The continuous flag.@NonNull public final ReplicatorConfiguration setDocumentIDs(@Nullable List<String> documentIDs)
documentIDs
- The document IDs.@NonNull public final ReplicatorConfiguration setHeaders(@NonNull Map<String,String> headers)
headers
- The HTTP Headers.@NonNull public final ReplicatorConfiguration setPinnedServerCertificate(@Nullable byte[] pinnedCert)
pinnedCert
- the SSL certificate.@NonNull public final ReplicatorConfiguration setPullFilter(@Nullable ReplicationFilter pullFilter)
pullFilter
- The filter to filter the document to be pulled.@NonNull public final ReplicatorConfiguration setPushFilter(ReplicationFilter pushFilter)
pushFilter
- The filter to filter the document to be pushed.@NonNull public final ReplicatorConfiguration setReplicatorType(@NonNull com.couchbase.lite.AbstractReplicatorConfiguration.ReplicatorType replicatorType)
replicatorType
- The replicator type.@Nullable public final Authenticator getAuthenticator()
@Nullable public final List<String> getChannels()
@Nullable public final ConflictResolver getConflictResolver()
public final boolean isContinuous()
@NonNull public final Database getDatabase()
@Nullable public final List<String> getDocumentIDs()
@Nullable public final Map<String,String> getHeaders()
@Nullable public final byte[] getPinnedServerCertificate()
@Nullable public final ReplicationFilter getPullFilter()
@Nullable public final ReplicationFilter getPushFilter()
@NonNull public final com.couchbase.lite.AbstractReplicatorConfiguration.ReplicatorType getReplicatorType()
@NonNull public final Endpoint getTarget()