Class CouchbaseResourceHolder

java.lang.Object
org.springframework.transaction.support.ResourceHolderSupport
org.springframework.data.couchbase.transaction.CouchbaseResourceHolder
All Implemented Interfaces:
ResourceHolder

@Internal public class CouchbaseResourceHolder extends ResourceHolderSupport
Container for couchbase transaction resources to hold in threadlocal or reactive context.
Author:
Michael Reiche
  • Constructor Details

    • CouchbaseResourceHolder

      public CouchbaseResourceHolder(@Nullable com.couchbase.client.core.transaction.CoreTransactionAttemptContext core)
      Create a new CouchbaseResourceHolder for a given session.
      Parameters:
      core - the associated CoreTransactionAttemptContext. Can be null.
    • CouchbaseResourceHolder

      public CouchbaseResourceHolder(@Nullable com.couchbase.client.core.transaction.CoreTransactionAttemptContext core, @Nullable Object securityContext)
      Create a new CouchbaseResourceHolder for a given session.
      Parameters:
      core - the associated CoreTransactionAttemptContext. Can be null.
  • Method Details

    • getCore

      @Nullable public com.couchbase.client.core.transaction.CoreTransactionAttemptContext getCore()
      Returns:
      the associated CoreTransactionAttemptContext. Can be null.
    • getSecurityContext

      @Nullable public Object getSecurityContext()
      Returns:
      the associated CoreTransactionAttemptContext. Can be null.
    • transactionResultHolder

      public Object transactionResultHolder(Object holder, Object o)