CompensatorOptions CompensatorOptions CompensatorOptions CompensatorOptions Enum

定义

指定一些标志,这些标志控制补偿资源管理器 (CRM) 补偿器应接收事务完成的哪些阶段,并且这些标志控制如果有问题的事务在尝试恢复后问题仍未解决则恢复是否应失败。Specifies flags that control which phases of transaction completion should be received by the Compensating Resource Manager (CRM) Compensator, and whether recovery should fail if questionable transactions remain after recovery has been attempted.

此枚举有一个 FlagsAttribute 属性,允许按位组合成员值。

public enum class CompensatorOptions
[System.Flags]
[System.Serializable]
public enum CompensatorOptions
type CompensatorOptions = 
Public Enum CompensatorOptions
继承
CompensatorOptionsCompensatorOptionsCompensatorOptionsCompensatorOptions
属性

字段

AbortPhase AbortPhase AbortPhase AbortPhase 4

表示中断阶段。Represents the abort phase.

AllPhases AllPhases AllPhases AllPhases 7

表示所有阶段。Represents all phases.

CommitPhase CommitPhase CommitPhase CommitPhase 2

表示提交阶段。Represents the commit phase.

FailIfInDoubtsRemain FailIfInDoubtsRemain FailIfInDoubtsRemain FailIfInDoubtsRemain 16

如果有问题的事务在尝试恢复后问题仍未解决则失败。Fails if in-doubt transactions remain after recovery has been attempted.

PreparePhase PreparePhase PreparePhase PreparePhase 1

表示准备阶段。Represents the prepare phase.

示例

下面的代码示例演示如何将此枚举。The following code example demonstrates the use of this enumeration.

// Create a new clerk using the AccountCompensator class.
Clerk^ clerk = gcnew Clerk(AccountCompensator::typeid,
    "An account transaction compensator", CompensatorOptions::AllPhases);
// Create a new clerk using the AccountCompensator class.
Clerk clerk = new Clerk(typeof(AccountCompensator),
  "An account transaction compensator", CompensatorOptions.AllPhases);
' Create a new clerk using the AccountCompensator class.
Dim clerk As New Clerk(GetType(AccountCompensator), "An account transaction compensator", CompensatorOptions.AllPhases)

适用于