Package com.ibm.cloud.cloudant.v1.model
Class ReplicationDocument
- java.lang.Object
-
- com.ibm.cloud.sdk.core.service.model.DynamicModel<Object>
-
- com.ibm.cloud.cloudant.v1.model.ReplicationDocument
-
- All Implemented Interfaces:
com.ibm.cloud.sdk.core.service.model.ObjectModel
public class ReplicationDocument extends com.ibm.cloud.sdk.core.service.model.DynamicModel<Object>
Schema for a replication document. Note that `selector`, `doc_ids`, and `filter` are incompatible with each other.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ReplicationDocument.Builder
Builder.
-
Constructor Summary
Constructors Constructor Description ReplicationDocument()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,Attachment>
getAttachments()
Gets the attachments.Long
getCheckpointInterval()
Gets the checkpointInterval.List<String>
getConflicts()
Gets the conflicts.Long
getConnectionTimeout()
Gets the connectionTimeout.ReplicationCreateTargetParameters
getCreateTargetParams()
Gets the createTargetParams.List<String>
getDeletedConflicts()
Gets the deletedConflicts.List<String>
getDocIds()
Gets the docIds.String
getFilter()
Gets the filter.Long
getHttpConnections()
Gets the httpConnections.String
getId()
Gets the id.String
getLocalSeq()
Gets the localSeq.Map<String,String>
getQueryParams()
Gets the queryParams.Long
getRetriesPerRequest()
Gets the retriesPerRequest.String
getRev()
Gets the rev.Revisions
getRevisions()
Gets the revisions.List<DocumentRevisionStatus>
getRevsInfo()
Gets the revsInfo.Map<String,Object>
getSelector()
Gets the selector.String
getSinceSeq()
Gets the sinceSeq.String
getSocketOptions()
Gets the socketOptions.ReplicationDatabase
getSource()
Gets the source.String
getSourceProxy()
Gets the sourceProxy.ReplicationDatabase
getTarget()
Gets the target.String
getTargetProxy()
Gets the targetProxy.UserContext
getUserCtx()
Gets the userCtx.Long
getWorkerBatchSize()
Gets the workerBatchSize.Long
getWorkerProcesses()
Gets the workerProcesses.Boolean
isCancel()
Gets the cancel.Boolean
isContinuous()
Gets the continuous.Boolean
isCreateTarget()
Gets the createTarget.Boolean
isDeleted()
Gets the deleted.Boolean
isUseCheckpoints()
Gets the useCheckpoints.ReplicationDocument.Builder
newBuilder()
New builder.void
setAttachments(Map<String,Attachment> attachments)
Sets the attachments.void
setCancel(Boolean cancel)
Sets the cancel.void
setCheckpointInterval(long checkpointInterval)
Sets the checkpointInterval.void
setConflicts(List<String> conflicts)
Sets the conflicts.void
setConnectionTimeout(long connectionTimeout)
Sets the connectionTimeout.void
setContinuous(Boolean continuous)
Sets the continuous.void
setCreateTarget(Boolean createTarget)
Sets the createTarget.void
setCreateTargetParams(ReplicationCreateTargetParameters createTargetParams)
Sets the createTargetParams.void
setDeleted(Boolean deleted)
Sets the deleted.void
setDeletedConflicts(List<String> deletedConflicts)
Sets the deletedConflicts.void
setDocIds(List<String> docIds)
Sets the docIds.void
setFilter(String filter)
Sets the filter.void
setHttpConnections(long httpConnections)
Sets the httpConnections.void
setId(String id)
Sets the id.void
setLocalSeq(String localSeq)
Sets the localSeq.void
setQueryParams(Map<String,String> queryParams)
Sets the queryParams.void
setRetriesPerRequest(long retriesPerRequest)
Sets the retriesPerRequest.void
setRev(String rev)
Sets the rev.void
setRevisions(Revisions revisions)
Sets the revisions.void
setRevsInfo(List<DocumentRevisionStatus> revsInfo)
Sets the revsInfo.void
setSelector(Map<String,Object> selector)
Sets the selector.void
setSinceSeq(String sinceSeq)
Sets the sinceSeq.void
setSocketOptions(String socketOptions)
Sets the socketOptions.void
setSource(ReplicationDatabase source)
Sets the source.void
setSourceProxy(String sourceProxy)
Sets the sourceProxy.void
setTarget(ReplicationDatabase target)
Sets the target.void
setTargetProxy(String targetProxy)
Sets the targetProxy.void
setUseCheckpoints(Boolean useCheckpoints)
Sets the useCheckpoints.void
setUserCtx(UserContext userCtx)
Sets the userCtx.void
setWorkerBatchSize(long workerBatchSize)
Sets the workerBatchSize.void
setWorkerProcesses(long workerProcesses)
Sets the workerProcesses.
-
-
-
Method Detail
-
newBuilder
public ReplicationDocument.Builder newBuilder()
New builder.- Returns:
- a ReplicationDocument builder
-
getAttachments
public Map<String,Attachment> getAttachments()
Gets the attachments. Schema for a map of attachment name to attachment metadata.- Returns:
- the attachments
-
setAttachments
public void setAttachments(Map<String,Attachment> attachments)
Sets the attachments.- Parameters:
attachments
- the new attachments
-
getConflicts
public List<String> getConflicts()
Gets the conflicts. Schema for a list of document revision identifiers.- Returns:
- the conflicts
-
setConflicts
public void setConflicts(List<String> conflicts)
Sets the conflicts.- Parameters:
conflicts
- the new conflicts
-
isDeleted
public Boolean isDeleted()
Gets the deleted. Deletion flag. Available if document was removed.- Returns:
- the deleted
-
setDeleted
public void setDeleted(Boolean deleted)
Sets the deleted.- Parameters:
deleted
- the new deleted
-
getDeletedConflicts
public List<String> getDeletedConflicts()
Gets the deletedConflicts. Schema for a list of document revision identifiers.- Returns:
- the deletedConflicts
-
setDeletedConflicts
public void setDeletedConflicts(List<String> deletedConflicts)
Sets the deletedConflicts.- Parameters:
deletedConflicts
- the new deletedConflicts
-
getId
public String getId()
Gets the id. Document ID.- Returns:
- the id
-
setId
public void setId(String id)
Sets the id.- Parameters:
id
- the new id
-
getLocalSeq
public String getLocalSeq()
Gets the localSeq. Document's update sequence in current database. Available if requested with local_seq=true query parameter.- Returns:
- the localSeq
-
setLocalSeq
public void setLocalSeq(String localSeq)
Sets the localSeq.- Parameters:
localSeq
- the new localSeq
-
getRev
public String getRev()
Gets the rev. Schema for a document revision identifier.- Returns:
- the rev
-
setRev
public void setRev(String rev)
Sets the rev.- Parameters:
rev
- the new rev
-
getRevisions
public Revisions getRevisions()
Gets the revisions. Schema for list of revision information.- Returns:
- the revisions
-
setRevisions
public void setRevisions(Revisions revisions)
Sets the revisions.- Parameters:
revisions
- the new revisions
-
getRevsInfo
public List<DocumentRevisionStatus> getRevsInfo()
Gets the revsInfo. Schema for a list of objects with information about local revisions and their status.- Returns:
- the revsInfo
-
setRevsInfo
public void setRevsInfo(List<DocumentRevisionStatus> revsInfo)
Sets the revsInfo.- Parameters:
revsInfo
- the new revsInfo
-
isCancel
public Boolean isCancel()
Gets the cancel. Cancels the replication.- Returns:
- the cancel
-
setCancel
public void setCancel(Boolean cancel)
Sets the cancel.- Parameters:
cancel
- the new cancel
-
getCheckpointInterval
public Long getCheckpointInterval()
Gets the checkpointInterval. Defines replication checkpoint interval in milliseconds.- Returns:
- the checkpointInterval
-
setCheckpointInterval
public void setCheckpointInterval(long checkpointInterval)
Sets the checkpointInterval.- Parameters:
checkpointInterval
- the new checkpointInterval
-
getConnectionTimeout
public Long getConnectionTimeout()
Gets the connectionTimeout. HTTP connection timeout per replication. Even for very fast/reliable networks it might need to be increased if a remote database is too busy.- Returns:
- the connectionTimeout
-
setConnectionTimeout
public void setConnectionTimeout(long connectionTimeout)
Sets the connectionTimeout.- Parameters:
connectionTimeout
- the new connectionTimeout
-
isContinuous
public Boolean isContinuous()
Gets the continuous. Configure the replication to be continuous.- Returns:
- the continuous
-
setContinuous
public void setContinuous(Boolean continuous)
Sets the continuous.- Parameters:
continuous
- the new continuous
-
isCreateTarget
public Boolean isCreateTarget()
Gets the createTarget. Creates the target database. Requires administrator privileges on target server.- Returns:
- the createTarget
-
setCreateTarget
public void setCreateTarget(Boolean createTarget)
Sets the createTarget.- Parameters:
createTarget
- the new createTarget
-
getCreateTargetParams
public ReplicationCreateTargetParameters getCreateTargetParams()
Gets the createTargetParams. Request parameters to use during target database creation.- Returns:
- the createTargetParams
-
setCreateTargetParams
public void setCreateTargetParams(ReplicationCreateTargetParameters createTargetParams)
Sets the createTargetParams.- Parameters:
createTargetParams
- the new createTargetParams
-
getDocIds
public List<String> getDocIds()
Gets the docIds. Schema for a list of document IDs.- Returns:
- the docIds
-
setDocIds
public void setDocIds(List<String> docIds)
Sets the docIds.- Parameters:
docIds
- the new docIds
-
getFilter
public String getFilter()
Gets the filter. The name of a filter function which is defined in a design document in the source database in {ddoc_id}/{filter} format. It determines which documents get replicated. Using the selector option provides performance benefits when compared with using the filter option. Use the selector option when possible.- Returns:
- the filter
-
setFilter
public void setFilter(String filter)
Sets the filter.- Parameters:
filter
- the new filter
-
getHttpConnections
public Long getHttpConnections()
Gets the httpConnections. Maximum number of HTTP connections per replication.- Returns:
- the httpConnections
-
setHttpConnections
public void setHttpConnections(long httpConnections)
Sets the httpConnections.- Parameters:
httpConnections
- the new httpConnections
-
getQueryParams
public Map<String,String> getQueryParams()
Gets the queryParams. Schema for a map of string key value pairs, such as query parameters.- Returns:
- the queryParams
-
setQueryParams
public void setQueryParams(Map<String,String> queryParams)
Sets the queryParams.- Parameters:
queryParams
- the new queryParams
-
getRetriesPerRequest
public Long getRetriesPerRequest()
Gets the retriesPerRequest. Number of times a replication request is retried. The requests are retried with a doubling exponential backoff starting at 0.25 seconds, with a cap at 5 minutes.- Returns:
- the retriesPerRequest
-
setRetriesPerRequest
public void setRetriesPerRequest(long retriesPerRequest)
Sets the retriesPerRequest.- Parameters:
retriesPerRequest
- the new retriesPerRequest
-
getSelector
public Map<String,Object> getSelector()
Gets the selector. JSON object describing criteria used to select documents. The selector specifies fields in the document, and provides an expression to evaluate with the field content or other data. The selector object must: * Be structured as valid JSON. * Contain a valid query expression. Using a selector is significantly more efficient than using a JavaScript filter function, and is the recommended option if filtering on document attributes only. Elementary selector syntax requires you to specify one or more fields, and the corresponding values required for those fields. You can create more complex selector expressions by combining operators. Operators are identified by the use of a dollar sign `$` prefix in the name field. There are two core types of operators in the selector syntax: * Combination operators: applied at the topmost level of selection. They are used to combine selectors. In addition to the common boolean operators (`$and`, `$or`, `$not`, `$nor`) there are three combination operators: `$all`, `$elemMatch`, and `$allMatch`. A combination operator takes a single argument. The argument is either another selector, or an array of selectors. * Condition operators: are specific to a field, and are used to evaluate the value stored in that field. For instance, the basic `$eq` operator matches when the specified field contains a value that is equal to the supplied argument.- Returns:
- the selector
-
setSelector
public void setSelector(Map<String,Object> selector)
Sets the selector.- Parameters:
selector
- the new selector
-
getSinceSeq
public String getSinceSeq()
Gets the sinceSeq. Start the replication at a specific sequence value.- Returns:
- the sinceSeq
-
setSinceSeq
public void setSinceSeq(String sinceSeq)
Sets the sinceSeq.- Parameters:
sinceSeq
- the new sinceSeq
-
getSocketOptions
public String getSocketOptions()
Gets the socketOptions. Replication socket options.- Returns:
- the socketOptions
-
setSocketOptions
public void setSocketOptions(String socketOptions)
Sets the socketOptions.- Parameters:
socketOptions
- the new socketOptions
-
getSource
public ReplicationDatabase getSource()
Gets the source. Schema for a replication source or target database.- Returns:
- the source
-
setSource
public void setSource(ReplicationDatabase source)
Sets the source.- Parameters:
source
- the new source
-
getSourceProxy
public String getSourceProxy()
Gets the sourceProxy. Address of a (http or socks5 protocol) proxy server through which replication with the source database should occur.- Returns:
- the sourceProxy
-
setSourceProxy
public void setSourceProxy(String sourceProxy)
Sets the sourceProxy.- Parameters:
sourceProxy
- the new sourceProxy
-
getTarget
public ReplicationDatabase getTarget()
Gets the target. Schema for a replication source or target database.- Returns:
- the target
-
setTarget
public void setTarget(ReplicationDatabase target)
Sets the target.- Parameters:
target
- the new target
-
getTargetProxy
public String getTargetProxy()
Gets the targetProxy. Address of a (http or socks5 protocol) proxy server through which replication with the target database should occur.- Returns:
- the targetProxy
-
setTargetProxy
public void setTargetProxy(String targetProxy)
Sets the targetProxy.- Parameters:
targetProxy
- the new targetProxy
-
isUseCheckpoints
public Boolean isUseCheckpoints()
Gets the useCheckpoints. Specify if checkpoints should be saved during replication. Using checkpoints means a replication can be efficiently resumed.- Returns:
- the useCheckpoints
-
setUseCheckpoints
public void setUseCheckpoints(Boolean useCheckpoints)
Sets the useCheckpoints.- Parameters:
useCheckpoints
- the new useCheckpoints
-
getUserCtx
public UserContext getUserCtx()
Gets the userCtx. Schema for the user context of a session.- Returns:
- the userCtx
-
setUserCtx
public void setUserCtx(UserContext userCtx)
Sets the userCtx.- Parameters:
userCtx
- the new userCtx
-
getWorkerBatchSize
public Long getWorkerBatchSize()
Gets the workerBatchSize. Controls how many documents are processed. After each batch a checkpoint is written so this controls how frequently checkpointing occurs.- Returns:
- the workerBatchSize
-
setWorkerBatchSize
public void setWorkerBatchSize(long workerBatchSize)
Sets the workerBatchSize.- Parameters:
workerBatchSize
- the new workerBatchSize
-
getWorkerProcesses
public Long getWorkerProcesses()
Gets the workerProcesses. Controls how many separate processes will read from the changes manager and write to the target. A higher number can improve throughput.- Returns:
- the workerProcesses
-
setWorkerProcesses
public void setWorkerProcesses(long workerProcesses)
Sets the workerProcesses.- Parameters:
workerProcesses
- the new workerProcesses
-
-