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.
  • Constructor Details

    • ReplicationDocument

      public ReplicationDocument()
  • Method Details

    • 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. Schema for a 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
    • getOwner

      public String 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

      public void setOwner(String owner)
      Sets the owner.
      Parameters:
      owner - the new owner
    • 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. 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. See [the Cloudant Docs](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-operators) for a list of all available combination and conditional operators. * 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. For further reference see [selector syntax](https://cloud.ibm.com/docs/Cloudant?topic=Cloudant-selector-syntax).
      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

      @Deprecated public String getSourceProxy()
      Deprecated.
      this method is deprecated and may be removed in a future release
      Gets 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 public void setSourceProxy(String sourceProxy)
      Deprecated.
      this method is deprecated and may be removed in a future release
      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

      @Deprecated public String getTargetProxy()
      Deprecated.
      this method is deprecated and may be removed in a future release
      Gets 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 public void setTargetProxy(String targetProxy)
      Deprecated.
      this method is deprecated and may be removed in a future release
      Sets the targetProxy.
      Parameters:
      targetProxy - the new targetProxy
    • isUseBulkGet

      public Boolean 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

      public void setUseBulkGet(Boolean useBulkGet)
      Sets the useBulkGet.
      Parameters:
      useBulkGet - the new useBulkGet
    • 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
    • isWinningRevsOnly

      public Boolean 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

      public void setWinningRevsOnly(Boolean winningRevsOnly)
      Sets the winningRevsOnly.
      Parameters:
      winningRevsOnly - the new winningRevsOnly
    • 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