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:
ObjectModel
Schema for a replication document. Note that `selector`, `doc_ids`, and `filter` are incompatible with each other.
This type supports additional properties of type Object.
-
Nested Class Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionGets the attachments.Gets the checkpointInterval.Gets the conflicts.Gets the connectionTimeout.Gets the createTargetParams.Gets the deletedConflicts.Gets the docIds.Gets the filter.Gets the httpConnections.getId()
Gets the id.Gets the localSeq.getOwner()
Gets the owner.Gets the queryParams.Gets the retriesPerRequest.getRev()
Gets the rev.Gets the revisions.Gets the revsInfo.Gets the selector.Gets the sinceSeq.Gets the socketOptions.Gets the source.Deprecated.this method is deprecated and may be removed in a future releaseGets the target.Deprecated.this method is deprecated and may be removed in a future releaseGets the userCtx.Gets the workerBatchSize.Gets the workerProcesses.isCancel()
Gets the cancel.Gets the continuous.Gets the createTarget.Gets the deleted.Gets the useBulkGet.Gets the useCheckpoints.Gets the winningRevsOnly.New builder.void
setAttachments
(Map<String, Attachment> attachments) Sets the attachments.void
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
Sets the docIds.void
Sets the filter.void
setHttpConnections
(long httpConnections) Sets the httpConnections.void
Sets the id.void
setLocalSeq
(String localSeq) Sets the localSeq.void
Sets the owner.void
setQueryParams
(Map<String, String> queryParams) Sets the queryParams.void
setRetriesPerRequest
(long retriesPerRequest) Sets the retriesPerRequest.void
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) Deprecated.this method is deprecated and may be removed in a future releasevoid
setTarget
(ReplicationDatabase target) Sets the target.void
setTargetProxy
(String targetProxy) Deprecated.this method is deprecated and may be removed in a future releasevoid
setUseBulkGet
(Boolean useBulkGet) Sets the useBulkGet.void
setUseCheckpoints
(Boolean useCheckpoints) Sets the useCheckpoints.void
setUserCtx
(UserContext userCtx) Sets the userCtx.void
setWinningRevsOnly
(Boolean winningRevsOnly) Sets the winningRevsOnly.void
setWorkerBatchSize
(long workerBatchSize) Sets the workerBatchSize.void
setWorkerProcesses
(long workerProcesses) Sets the workerProcesses.Methods inherited from class com.ibm.cloud.sdk.core.service.model.DynamicModel
equals, get, getAdditionalPropertyTypeToken, getProperties, getPropertyNames, hashCode, put, removeProperties, removeProperty, setProperties, toString
-
Constructor Details
-
ReplicationDocument
public ReplicationDocument()
-
-
Method Details
-
newBuilder
New builder.- Returns:
- a ReplicationDocument builder
-
getAttachments
Gets the attachments. Schema for a map of attachment name to attachment metadata.- Returns:
- the attachments
-
setAttachments
Sets the attachments.- Parameters:
attachments
- the new attachments
-
getConflicts
Gets the conflicts. Schema for a list of document revision identifiers.- Returns:
- the conflicts
-
setConflicts
Sets the conflicts.- Parameters:
conflicts
- the new conflicts
-
isDeleted
Gets the deleted. Deletion flag. Available if document was removed.- Returns:
- the deleted
-
setDeleted
Sets the deleted.- Parameters:
deleted
- the new deleted
-
getDeletedConflicts
Gets the deletedConflicts. Schema for a list of document revision identifiers.- Returns:
- the deletedConflicts
-
setDeletedConflicts
Sets the deletedConflicts.- Parameters:
deletedConflicts
- the new deletedConflicts
-
getId
Gets the id. Schema for a document ID.- Returns:
- the id
-
setId
Sets the id.- Parameters:
id
- the new id
-
getLocalSeq
Gets the localSeq. Document's update sequence in current database. Available if requested with local_seq=true query parameter.- Returns:
- the localSeq
-
setLocalSeq
Sets the localSeq.- Parameters:
localSeq
- the new localSeq
-
getRev
Gets the rev. Schema for a document revision identifier.- Returns:
- the rev
-
setRev
Sets the rev.- Parameters:
rev
- the new rev
-
getRevisions
Gets the revisions. Schema for list of revision information.- Returns:
- the revisions
-
setRevisions
Sets the revisions.- Parameters:
revisions
- the new revisions
-
getRevsInfo
Gets the revsInfo. Schema for a list of objects with information about local revisions and their status.- Returns:
- the revsInfo
-
setRevsInfo
Sets the revsInfo.- Parameters:
revsInfo
- the new revsInfo
-
isCancel
Gets the cancel. Cancels the replication.- Returns:
- the cancel
-
setCancel
Sets the cancel.- Parameters:
cancel
- the new cancel
-
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
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
Gets the continuous. Configure the replication to be continuous.- Returns:
- the continuous
-
setContinuous
Sets the continuous.- Parameters:
continuous
- the new continuous
-
isCreateTarget
Gets the createTarget. Creates the target database. Requires administrator privileges on target server.- Returns:
- the createTarget
-
setCreateTarget
Sets the createTarget.- Parameters:
createTarget
- the new createTarget
-
getCreateTargetParams
Gets the createTargetParams. Request parameters to use during target database creation.- Returns:
- the createTargetParams
-
setCreateTargetParams
Sets the createTargetParams.- Parameters:
createTargetParams
- the new createTargetParams
-
getDocIds
Gets the docIds. Schema for a list of document IDs.- Returns:
- the docIds
-
setDocIds
Sets the docIds.- Parameters:
docIds
- the new docIds
-
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
Sets the filter.- Parameters:
filter
- the new filter
-
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
-
getOwner
Gets the owner. The replication document owner. The server sets an appropriate value if the field is unset when writing a replication document. Only administrators can modify the value to an owner other than themselves.- Returns:
- the owner
-
setOwner
Sets the owner.- Parameters:
owner
- the new owner
-
getQueryParams
Gets the queryParams. Schema for a map of string key value pairs, such as query parameters.- Returns:
- the queryParams
-
setQueryParams
Sets the queryParams.- Parameters:
queryParams
- the new queryParams
-
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
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. 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. It is important for query performance to use appropriate selectors: * Only equality operators such as `$eq`, `$gt`, `$gte`, `$lt`, and `$lte` (but not `$ne`) can be used as the basis of a query. You should include at least one of these in a selector. * Some operators such as `$not`, `$or`, `$in`, and `$regex` cannot be answered from an index. For query selectors use these operators in conjunction with equality operators or create and use a partial index to reduce the number of documents that will need to be scanned. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators)for a list of all available combination and conditional operators. For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).- Returns:
- the selector
-
setSelector
Sets the selector.- Parameters:
selector
- the new selector
-
getSinceSeq
Gets the sinceSeq. Start the replication at a specific sequence value.- Returns:
- the sinceSeq
-
setSinceSeq
Sets the sinceSeq.- Parameters:
sinceSeq
- the new sinceSeq
-
getSocketOptions
Gets the socketOptions. Replication socket options.- Returns:
- the socketOptions
-
setSocketOptions
Sets the socketOptions.- Parameters:
socketOptions
- the new socketOptions
-
getSource
Gets the source. Schema for a replication source or target database.- Returns:
- the source
-
setSource
Sets the source.- Parameters:
source
- the new source
-
getSourceProxy
Deprecated.this method is deprecated and may be removed in a future releaseGets the sourceProxy. This setting is forbidden in IBM Cloudant replication documents. This setting may be used with alternative replication mediators. Address of a (http or socks5 protocol) proxy server through which replication with the source database should occur.- Returns:
- the sourceProxy
-
setSourceProxy
Deprecated.this method is deprecated and may be removed in a future releaseSets the sourceProxy.- Parameters:
sourceProxy
- the new sourceProxy
-
getTarget
Gets the target. Schema for a replication source or target database.- Returns:
- the target
-
setTarget
Sets the target.- Parameters:
target
- the new target
-
getTargetProxy
Deprecated.this method is deprecated and may be removed in a future releaseGets the targetProxy. This setting is forbidden in IBM Cloudant replication documents. This setting may be used with alternative replication mediators. Address of a (http or socks5 protocol) proxy server through which replication with the target database should occur.- Returns:
- the targetProxy
-
setTargetProxy
Deprecated.this method is deprecated and may be removed in a future releaseSets the targetProxy.- Parameters:
targetProxy
- the new targetProxy
-
isUseBulkGet
Gets the useBulkGet. Specify whether to use _bulk_get for fetching documents from the source. If unset, the server configured default will be used.- Returns:
- the useBulkGet
-
setUseBulkGet
Sets the useBulkGet.- Parameters:
useBulkGet
- the new useBulkGet
-
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
Sets the useCheckpoints.- Parameters:
useCheckpoints
- the new useCheckpoints
-
getUserCtx
Gets the userCtx. Schema for the user context of a session.- Returns:
- the userCtx
-
setUserCtx
Sets the userCtx.- Parameters:
userCtx
- the new userCtx
-
isWinningRevsOnly
Gets the winningRevsOnly. Replicate only the winning revisions. Replication with this mode discards conflicting revisions. Replication IDs and checkpoints generated by this mode are different to those generated by default, so it is possible to first replicate the winning revisions then later backfill remaining revisions with a regular replication job.- Returns:
- the winningRevsOnly
-
setWinningRevsOnly
Sets the winningRevsOnly.- Parameters:
winningRevsOnly
- the new winningRevsOnly
-
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
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
-