Immutable context shared by every participant of one transaction. 更多...
#include <Transaction.h>
Public 成员函数 | |
| TransactionContext (std::string transactionId, std::string correlationId={}, std::string causationId={}) | |
| Construct transaction correlation metadata. | |
| TransactionContext (eve::TransactionId transactionId, std::string correlationId={}, std::string causationId={}) | |
| Construct a canonical UUID-backed transaction context. | |
| const eve::TransactionId & | identity () const noexcept |
| Canonical UUID-backed identity; nil only for the legacy string facade. | |
| const std::string & | transactionId () const noexcept |
| Stable identifier projection retained for compatibility. | |
| const std::string & | correlationId () const noexcept |
| Business-chain correlation identifier, possibly empty. | |
| const std::string & | causationId () const noexcept |
| Directly causing command/event identifier, possibly empty. | |
详细描述
Immutable context shared by every participant of one transaction.
The coordinator copies the identifiers supplied here into its receipt and passes this same context to every lifecycle call. The context is borrowed only for the duration of a synchronous call; participants must copy values they need after that call. The coordinator and participants must run on the same thread unless a participant explicitly documents another affinity.
在文件 Transaction.h 第 30 行定义.
构造及析构函数说明
◆ TransactionContext() [1/2]
|
inline |
Construct transaction correlation metadata.
- 参数
-
transactionId Stable identifier for this transaction. correlationId Identifier of the business chain, if any. causationId Identifier of the command/event that caused it, if any.
Transaction id.
Correlation id.
Causation id.
在文件 Transaction.h 第 38 行定义.
◆ TransactionContext() [2/2]
|
inlineexplicit |
Construct a canonical UUID-backed transaction context.
- 参数
-
transactionId Non-nil cross-process transaction identity. correlationId Identifier of the business chain, if any. causationId Identifier of the command/event that caused it, if any.
- 备注
- The string accessor remains a compatibility projection of the UUID.
Identity.
Transaction id.
Correlation id.
Causation id.
在文件 Transaction.h 第 53 行定义.
成员函数说明
◆ causationId()
|
inlinenoexcept |
Directly causing command/event identifier, possibly empty.
在文件 Transaction.h 第 71 行定义.
◆ correlationId()
|
inlinenoexcept |
Business-chain correlation identifier, possibly empty.
在文件 Transaction.h 第 69 行定义.
◆ identity()
|
inlinenoexcept |
Canonical UUID-backed identity; nil only for the legacy string facade.
在文件 Transaction.h 第 65 行定义.
◆ transactionId()
|
inlinenoexcept |
Stable identifier projection retained for compatibility.
在文件 Transaction.h 第 67 行定义.
该类的文档由以下文件生成:
- src/modules/transaction/Transaction.h