Uploaded image for project: 'Couchbase Java Client'
  1. Couchbase Java Client
  2. JCBC-2157

Use callbacks for transactions config

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.7.2
    • None
    • None
    • None
    • 1
    • SDK30

    Description

      Suggested Release Note

      Transaction settings are now configurable using the same callback pattern used by other environment settings. Here's an example of the new syntax:

      Cluster cluster = Cluster.connect(
        connectionString,
        ClusterOptions.clusterOptions(username, password)
          .environment(env -> env
            .transactionsConfig(txn -> txn
              .durabilityLevel(DurabilityLevel.MAJORITY_AND_PERSIST_TO_ACTIVE)
              .metadataCollection(someKeyspace)
              .queryConfig(query -> query.scanConsistency(QueryScanConsistency.REQUEST_PLUS))
              .cleanupConfig(cleanup -> cleanup
                .cleanupWindow(Duration.ofSeconds(10))
                .addCollection(someOtherKeyspace))
            )
          )
      );
      

       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            david.nault David Nault
            david.nault David Nault
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes

                PagerDuty