Interface OracleSessionlessTransactionPropagationOperations


public interface OracleSessionlessTransactionPropagationOperations
Operations for non-HTTP propagation of Oracle sessionless transaction identifiers.

The HTTP server filter installs the same propagation state for HTTP requests. Code running outside HTTP can use this API to create an equivalent propagation scope and exchange encoded transaction identifiers with other transports.

Since:
5.2.0
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Clears the current transaction identifier from the active propagation state.
     
    void
    setTransactionId(String encodedTransactionId)
    Replaces the current transaction identifier in the active propagation state.
    <T extends @Nullable Object>
    T
    withPropagation(String encodedTransactionId, Supplier<T> supplier)
    Executes the supplier with an Oracle sessionless transaction identifier already available to resume.
    <T extends @Nullable Object>
    T
    Executes the supplier with an empty Oracle sessionless transaction propagation state.
  • Method Details

    • withPropagation

      <T extends @Nullable Object> T withPropagation(Supplier<T> supplier)
      Executes the supplier with an empty Oracle sessionless transaction propagation state.
      Type Parameters:
      T - The result type
      Parameters:
      supplier - The supplier to execute
      Returns:
      The supplier result
    • withPropagation

      <T extends @Nullable Object> T withPropagation(String encodedTransactionId, Supplier<T> supplier)
      Executes the supplier with an Oracle sessionless transaction identifier already available to resume.
      Type Parameters:
      T - The result type
      Parameters:
      encodedTransactionId - The transaction identifier encoded by OracleSessionlessTransactionIdCodec
      supplier - The supplier to execute
      Returns:
      The supplier result
    • currentTransactionId

      Optional<String> currentTransactionId()
      Returns:
      The current transaction identifier encoded by OracleSessionlessTransactionIdCodec, if one is available
    • setTransactionId

      void setTransactionId(String encodedTransactionId)
      Replaces the current transaction identifier in the active propagation state.
      Parameters:
      encodedTransactionId - The transaction identifier encoded by OracleSessionlessTransactionIdCodec
    • clearTransactionId

      void clearTransactionId()
      Clears the current transaction identifier from the active propagation state.