载入中...
搜索中...
未找到
eve::transaction::TransactionContext类 参考

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]

eve::transaction::TransactionContext::TransactionContext ( std::string  transactionId,
std::string  correlationId = {},
std::string  causationId = {} 
)
inline

Construct transaction correlation metadata.

参数
transactionIdStable identifier for this transaction.
correlationIdIdentifier of the business chain, if any.
causationIdIdentifier of the command/event that caused it, if any.

Transaction id.

Correlation id.

Causation id.

在文件 Transaction.h 第 38 行定义.

◆ TransactionContext() [2/2]

eve::transaction::TransactionContext::TransactionContext ( eve::TransactionId  transactionId,
std::string  correlationId = {},
std::string  causationId = {} 
)
inlineexplicit

Construct a canonical UUID-backed transaction context.

参数
transactionIdNon-nil cross-process transaction identity.
correlationIdIdentifier of the business chain, if any.
causationIdIdentifier 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()

const std::string & eve::transaction::TransactionContext::causationId ( ) const
inlinenoexcept

Directly causing command/event identifier, possibly empty.

在文件 Transaction.h 第 71 行定义.

◆ correlationId()

const std::string & eve::transaction::TransactionContext::correlationId ( ) const
inlinenoexcept

Business-chain correlation identifier, possibly empty.

在文件 Transaction.h 第 69 行定义.

◆ identity()

const eve::TransactionId & eve::transaction::TransactionContext::identity ( ) const
inlinenoexcept

Canonical UUID-backed identity; nil only for the legacy string facade.

在文件 Transaction.h 第 65 行定义.

◆ transactionId()

const std::string & eve::transaction::TransactionContext::transactionId ( ) const
inlinenoexcept

Stable identifier projection retained for compatibility.

在文件 Transaction.h 第 67 行定义.


该类的文档由以下文件生成: