CompensatorOptions 列舉

定義

指定旗標,以控制 Compensating Resource Manager (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
繼承
CompensatorOptions
屬性

欄位

AbortPhase 4

表示中止階段。Represents the abort phase.

AllPhases 7

表示所有階段。Represents all phases.

CommitPhase 2

表示認可階段。Represents the commit phase.

FailIfInDoubtsRemain 16

如果疑慮中的交易在已嘗試復原之後仍存留的話,則失敗。Fails if in-doubt transactions remain after recovery has been attempted.

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)

適用於