public abstract class AbstractReplicatorConfiguration extends Object
Modifier and Type | Class and Description |
---|---|
static class |
AbstractReplicatorConfiguration.ReplicatorType
Replicator type
PUSH_AND_PULL: Bidirectional; both push and pull
PUSH: Pushing changes to the target
PULL: Pulling changes from the target
|
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.
|
long |
getHeartbeat()
Return the heartbeat interval, in seconds.
|
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.
|
AbstractReplicatorConfiguration.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 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 |
setHeartbeat(long heartbeat)
Set the heartbeat interval, in seconds.
|
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(AbstractReplicatorConfiguration.ReplicatorType replicatorType)
Sets the replicator type indicating the direction of the replicator.
|
String |
toString() |
@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 AbstractReplicatorConfiguration.ReplicatorType replicatorType)
replicatorType
- The replicator type.public final ReplicatorConfiguration setHeartbeat(long heartbeat)
@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 AbstractReplicatorConfiguration.ReplicatorType getReplicatorType()
@NonNull public final Endpoint getTarget()
public long getHeartbeat()