public class Replication
extends java.lang.Object
_replicate
URI.
ReplicationResult replication = db.replication()
.source("source-db")
.target("target-db")
.createTarget(true)
.filter("example/filter1")
.trigger();
List<ReplicationHistory> histories = replication.getHistories();
CloudantClient.replication()
,
ReplicationResult
,
ReplicationResult.ReplicationHistory
,
Replicator
Modifier and Type | Method and Description |
---|---|
Replication |
cancel(java.lang.Boolean cancel) |
Replication |
continuous(java.lang.Boolean continuous) |
Replication |
createTarget(java.lang.Boolean createTarget) |
Replication |
docIds(java.lang.String... docIds)
Limit the replication to the specified document IDs.
|
Replication |
filter(java.lang.String filter)
Specify a filter function to limit the documents that are replicated from the source
database.
|
Replication |
proxy(java.lang.String proxy) |
Replication |
queryParams(java.util.Map<java.lang.String,java.lang.Object> queryParams)
Specify additional query parameters to be passed to the filter function.
|
Replication |
queryParams(java.lang.String queryParams)
Specify additional query parameters to be passed to the filter function.
|
Replication |
sinceSeq(java.lang.Integer sinceSeq)
Create or modify a replication since an update sequence using a replication document.
|
Replication |
sinceSeq(java.lang.String sinceSeq)
Create or modify a replication since an update sequence using a replication document.
|
Replication |
source(java.lang.String source)
Specify the name or URL of the database source of the replication.
|
Replication |
sourceIamApiKey(java.lang.String iamApiKey)
Sets the
IAM API key for the replication source.
|
Replication |
target(java.lang.String target)
Specify the name or URL of the database target of the replication.
|
Replication |
targetIamApiKey(java.lang.String iamApiKey)
Sets the
IAM API key for the replication target.
|
Replication |
targetOauth(java.lang.String consumerSecret,
java.lang.String consumerKey,
java.lang.String tokenSecret,
java.lang.String token)
Set OAuth 1 authentication credentials for the replication target
|
ReplicationResult |
trigger()
Triggers a replication request, blocks while the replication is in progress.
|
public ReplicationResult trigger()
public Replication source(java.lang.String source)
source
- name or URL of the source databasepublic Replication target(java.lang.String target)
target
- name or URL of the target databasepublic Replication continuous(java.lang.Boolean continuous)
continuous
- true
if the Replication should be continuouspublic Replication filter(java.lang.String filter)
filter
- name of the filter function in the form of designDoc/filter
public Replication queryParams(java.lang.String queryParams)
"{\"key1\": \"value1\", \"key2\": \"value2\"}"
queryParams
- string form of JSON object of query parameterspublic Replication queryParams(java.util.Map<java.lang.String,java.lang.Object> queryParams)
queryParams
- map of key-value parameterspublic Replication docIds(java.lang.String... docIds)
docIds
- one or more document IDs to include in the replicationpublic Replication proxy(java.lang.String proxy)
proxy
- address of a proxy server through which the replication should occurpublic Replication cancel(java.lang.Boolean cancel)
cancel
- true
to cancel the replicationpublic Replication createTarget(java.lang.Boolean createTarget)
createTarget
- true
if the target database should be createdpublic Replication sinceSeq(java.lang.Integer sinceSeq)
sinceSeq
- sequence numberpublic Replication sinceSeq(java.lang.String sinceSeq)
sinceSeq
- sequence stringpublic Replication sourceIamApiKey(java.lang.String iamApiKey)
iamApiKey
- IAM API Keypublic Replication targetIamApiKey(java.lang.String iamApiKey)
iamApiKey
- IAM API Keypublic Replication targetOauth(java.lang.String consumerSecret, java.lang.String consumerKey, java.lang.String tokenSecret, java.lang.String token)
consumerSecret
- client secretconsumerKey
- client identifiertokenSecret
- OAuth server token secrettoken
- OAuth server issued token