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 调用方法,则此接口的实现必须以传播标记的形式生成分布式事务,并将其返回到 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 方法或 Rollback 对象的方法,在提升、提交或回滚事务时向参与者发出通知。After 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.

适用于

另请参阅