Show / Hide Table of Contents

    Interface ITwoPhaseCommit

    An interface for implementations that support 2-phase commit. You can use TwoPhaseCommitTool to execute a 2-phase commit algorithm over several ITwoPhaseCommits.

    This is a Lucene.NET EXPERIMENTAL API, use at your own risk
    Namespace: Lucene.Net.Index
    Assembly: Lucene.Net.dll
    Syntax
    public interface ITwoPhaseCommit

    Methods

    | Improve this Doc View Source

    Commit()

    The second phase of a 2-phase commit. Implementations should ideally do very little work in this method (following PrepareCommit(), and after it returns, the caller can assume that the changes were successfully committed to the underlying storage.

    Declaration
    void Commit()
    | Improve this Doc View Source

    PrepareCommit()

    The first stage of a 2-phase commit. Implementations should do as much work as possible in this method, but avoid actual committing changes. If the 2-phase commit fails, Rollback() is called to discard all changes since last successful commit.

    Declaration
    void PrepareCommit()
    | Improve this Doc View Source

    Rollback()

    Discards any changes that have occurred since the last commit. In a 2-phase commit algorithm, where one of the objects failed to Commit() or PrepareCommit(), this method is used to roll all other objects back to their previous state.

    Declaration
    void Rollback()
    • Improve this Doc
    • View Source
    Back to top Copyright © 2020 Licensed to the Apache Software Foundation (ASF)