Class TransactionReplaceOptions

java.lang.Object
com.couchbase.client.java.transactions.config.TransactionReplaceOptions

@Volatile public class TransactionReplaceOptions extends Object
Operations controlling a transactional replace.
  • Method Details

    • transactionReplaceOptions

      public static TransactionReplaceOptions transactionReplaceOptions()
    • transcoder

      @SinceCouchbase("7.6.2") public TransactionReplaceOptions transcoder(Transcoder transcoder)
      Specify a custom Transcoder that is used to encode the content.

      If not-specified, the ClusterEnvironment's JsonSerializer (NOT transcoder) is used.

      It is marked as being available from 7.6.2 because prior to this, only JSON documents were supported in transactions. This release added support for binary documents.

      Parameters:
      transcoder - the custom transcoder that should be used for encoding.
      Returns:
      this to allow method chaining.
    • expiry

      public TransactionReplaceOptions expiry(Duration expiry)
      Sets an expiry for the document. By default the document will never expire.
      Parameters:
      expiry - the duration after which the document will expire (zero duration means never expire).
      Returns:
      this options class for chaining purposes.
    • expiry

      public TransactionReplaceOptions expiry(Instant expiry)
      Sets the expiry for the document. By default the document will never expire.
      Parameters:
      expiry - the point in time when the document will expire (epoch second zero means never expire).
      Returns:
      this options class for chaining purposes.
    • build