Class ComparisonDataSourceTransactionalContext

  • public class ComparisonDataSourceTransactionalContext
    extends Object
    Data source transactional context holder. Contains all transactions started for the current operation for all available data sources participating in the operation.
    • Constructor Detail

      • ComparisonDataSourceTransactionalContext

        public ComparisonDataSourceTransactionalContext​(IComparisonDataSourceTransaction mainTransaction,
                                                        IComparisonDataSourceTransaction otherTransaction,
                                                        IComparisonDataSourceTransaction ancestorTransaction,
                                                        boolean mergeMode)
        Creates an instance of the context using the provided set of transactions
        mainTransaction - The main source transaction
        otherTransaction - The other source transaction
        ancestorTransaction - The ancestor side transaction
        mergeMode - During the merge the main data source transaction is in a slave mode, so we shouldn't dispose it.
      • ComparisonDataSourceTransactionalContext

        public ComparisonDataSourceTransactionalContext​(IComparisonSession session,
                                                        IBmTransaction mergeTransaction)
        Constructs the context using the data from the comparison session.
        session - The current comparison session. Cannot be {@code null)
        mergeTransaction - The merge transaction. Can be {@code null) in case of comparison mode
    • Method Detail

      • close

        public void close()
        Closes the transactional context, effectively closing all underlying transactions
      • reset

        public void reset()
        Resets the transactional context, effectively closing all read-only transactions
      • getTransaction

        public IComparisonDataSourceTransaction getTransaction​(ComparisonSide side)
        Gets the transaction for the given side.
        side - The comparison side. Cannot be {@code null)
        The corresponding transaction if available; null otherwise