couchbase-protolib/src/main/java/com/streamsets/pipeline/stage/destination/couchbase/CouchbaseTarget.java
private Observable<DocumentFragment<Mutation>> buildSubdocMutation(AsyncMutateInBuilder mutation, int ttl, long cas,
      boolean upsertDoc) {

    return mutation
        .upsertDocument(upsertDoc)
        .withExpiry(ttl)
        .withCas(cas)
        .withDurability(config.persistTo, config.replicateTo)
        .execute()
        .timeout(config.couchbase.kvTimeout, TimeUnit.MILLISECONDS);
  }
private Observable<DocumentFragment<Mutation>> buildSubdocMutation(AsyncMutateInBuilder mutation, int ttl, long cas,
      boolean upsertDoc) {

    return mutation
        .upsertDocument(upsertDoc)
        .withExpiry(ttl)
        .withCas(cas)
        .withDurability(config.persistTo, config.replicateTo)
        .execute()
        .timeout(config.couchbase.kvTimeout, TimeUnit.MILLISECONDS);
  }
Applies standard options to sub-document mutations

@param mutation the mutation to be augmented
@param ttl the time to live to be set on the parent document
@param cas the compare-and-swap (CAS) value to apply to the write
@param upsertDoc defines whether the parent document should be created if it does not exist
@return an augmented mutation