public final class ReplicatorConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
ReplicatorConfiguration.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()
The conflict resolver for this replicator.
|
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.
|
ReplicatorConfiguration.ReplicatorType |
getReplicatorType()
Return Replicator type indicating the direction of the replicator.
|
Endpoint |
getTarget()
Return the replication target to replicate with.
|
boolean |
isContinuous()
Return the continuous flag indicating whether the replicator should stay
active indefinitely to replicate changed documents.
|
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 custom conflict resolver for this replicator.
|
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[] pinnedServerCertificate)
Sets the target server's SSL certificate.
|
ReplicatorConfiguration |
setReplicatorType(ReplicatorConfiguration.ReplicatorType replicatorType)
Sets the replicator type indicating the direction of the replicator.
|
public ReplicatorConfiguration(ReplicatorConfiguration config)
public ReplicatorConfiguration setReplicatorType(ReplicatorConfiguration.ReplicatorType replicatorType)
replicatorType
- The replicator type.public ReplicatorConfiguration setContinuous(boolean continuous)
continuous
- The continuous flag.public ReplicatorConfiguration setConflictResolver(ConflictResolver conflictResolver)
conflictResolver
- The conflict resolver.public ReplicatorConfiguration setAuthenticator(Authenticator authenticator)
authenticator
- The authenticator.public ReplicatorConfiguration setPinnedServerCertificate(byte[] pinnedServerCertificate)
pinnedServerCertificate
- the SSL certificate.public ReplicatorConfiguration setHeaders(Map<String,String> headers)
headers
- The HTTP Headers.public ReplicatorConfiguration setChannels(List<String> channels)
channels
- The Sync Gateway channel names.public ReplicatorConfiguration setDocumentIDs(List<String> documentIDs)
documentIDs
- The document IDs.public Database getDatabase()
public Endpoint getTarget()
public ReplicatorConfiguration.ReplicatorType getReplicatorType()
public boolean isContinuous()
public ConflictResolver getConflictResolver()
public Authenticator getAuthenticator()
public byte[] getPinnedServerCertificate()
public Map<String,String> getHeaders()
public List<String> getChannels()