Class TransactionInsertOptions

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

@Volatile public class TransactionInsertOptions extends Object
Operations controlling a transactional insert.
  • Method Details

    • transactionInsertOptions

      public static TransactionInsertOptions transactionInsertOptions()
    • transcoder

      @SinceCouchbase("7.6.2") public TransactionInsertOptions 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 TransactionInsertOptions expiry(Duration expiry)
      Sets the 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 TransactionInsertOptions 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