Redigeeri

Jagamisviis:


Compensator.EndPrepare Method

Definition

Notifies the Compensating Resource Manager (CRM) Compensator that it has had all the log records available during the prepare phase.

public:
 virtual bool EndPrepare();
public virtual bool EndPrepare ();
abstract member EndPrepare : unit -> bool
override this.EndPrepare : unit -> bool
Public Overridable Function EndPrepare () As Boolean

Returns

true if successful; otherwise, false.

Examples

The following code example demonstrates the implementation of this method.

public:
    virtual bool EndPrepare() override
    {
        // Allow the transaction to proceed onlyif we have received a prepare
        // record.
        if (receivedPrepareRecord)
        {
            return true;
        }
        else
        {
            return false;
        }
    }
public override bool EndPrepare ()
{
    // Allow the transaction to proceed onlyif we have received a prepare record.
    if (receivedPrepareRecord)
    {
        return(true);
    }
    else
    {
        return(false);
    }
}
Public Overrides Function EndPrepare() As Boolean 
    ' Allow the transaction to proceed onlyif we have received a prepare record.
    If receivedPrepareRecord Then
        Return True
    Else
        Return False
    End If

End Function 'EndPrepare

Applies to