Package sonia.scm

Class TransactionId

java.lang.Object
sonia.scm.TransactionId

public final class TransactionId extends Object
Id of the current transaction. The transaction id is mainly used for logging and debugging.
Since:
2.10.0
  • Field Details

  • Method Details

    • set

      public static void set(String transactionId)
      Binds the given transaction id to the current thread.
      Parameters:
      transactionId - transaction id
    • get

      public static Optional<String> get()
      Returns an optional transaction id. If there is no transaction id bound to the thread, the method will return an empty optional.
      Returns:
      optional transaction id
    • clear

      public static void clear()
      Removes a bound transaction id from the current thread.