IPromotableSinglePhaseNotification 介面

定義

描述物件,該物件用來當做資源管理員內部之非分散式交易的認可委派。Describes an object that acts as a commit delegate for a non-distributed transaction internal to a resource manager.

public interface class IPromotableSinglePhaseNotification : System::Transactions::ITransactionPromoter
public interface IPromotableSinglePhaseNotification : System.Transactions.ITransactionPromoter
type IPromotableSinglePhaseNotification = interface
    interface ITransactionPromoter
Public Interface IPromotableSinglePhaseNotification
Implements ITransactionPromoter
實作

備註

可提升登記 (PSPE) 允許資源(例如資料庫)取得交易的擁有權(如果它是參與交易的唯一實體)。Promotable Enlistments (PSPE) allow a resource, such as a database, to take ownership of the transaction if it is the only entity participating in the transaction. 之後,如果需要, System.Transactions 基礎結構仍可將交易呈報至 MSDTC。Later, if needed, the System.Transactions infrastructure can still escalate the transaction to MSDTC. 如需詳細資訊,請參閱 使用單一階段認可和可提升單一階段通知的優化For more information, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

執行此介面的資源管理員會將其內部非分散式交易認可的控制權委派給 System.Transactions 透過類別上的方法的交易登記 EnlistPromotableSinglePhase TransactionA resource manager that implements this interface delegates control of the commit of it's internal non-distributed transaction to an enlistment on a System.Transactions transaction through the EnlistPromotableSinglePhase method on the Transaction class.

如果 ITransactionPromoter.Promote 呼叫方法,則您的這個介面的執行必須以傳播 token 的形式產生分散式交易,並將其傳回 System.TransactionsIf the ITransactionPromoter.Promote method is called, your implementation of this interface must produce a distributed transaction in the form of a propagation token, and return it to System.Transactions.

當您使用方法來登錄將此介面實作為交易參與者的物件之後 EnlistPromotableSinglePhase ,交易管理員接著會透過叫用 Promote 方法、 SinglePhaseCommit 方法或物件的方法,在交易升級、認可或復原時,通知參與者 RollbackAfter you enlist an object that implements this interface as a participant of a transaction using the EnlistPromotableSinglePhase method, the transaction manager then notifies the participant when the transaction is promoted, committed, or rolled back by invoking the Promote method, the SinglePhaseCommit method, or the Rollback method of the object.

如需詳細資訊,請參閱 使用單一階段認可和可提升單一階段通知的優化For more information, see Optimization Using Single Phase Commit and Promotable Single Phase Notification.

方法

Initialize()

告知交易參與者已成功完成登記。Notifies a transaction participant that enlistment has completed successfully.

Promote()

向未登記的物件告知已經要求擴大已委派之交易的規模。Notifies an enlisted object that an escalation of the delegated transaction has been requested.

(繼承來源 ITransactionPromoter)
Rollback(SinglePhaseEnlistment)

告知登記的物件正在復原交易。Notifies an enlisted object that the transaction is being rolled back.

SinglePhaseCommit(SinglePhaseEnlistment)

告知登記的物件正在認可交易。Notifies an enlisted object that the transaction is being committed.

適用於

另請參閱