public void rollback()
    {
        TxId txId = null;

        // Check if in a higher transactional mode than none, otherwise commit does nothing.
        if (!getIsolationLevel().equals(IsolationLevel.None))
        {
            // Extract the current transaction id.
            txId = TxManager.getTxIdFromThread();

            // Check that this transaction has made changes to be rolled back.
            List<TxOperation> alterations = txWrites.get(txId);

            if (alterations != null)
            {
                // Loop through all the writes that the transaction wants to apply to the resource.
                for (TxOperation nextAlteration : alterations)
                {
                    // Cancel the operation.
                    nextAlteration.cancel(false);
                }
            }

            // Discard all the changes that the transaction was going to make.
            txWrites.remove(txId);
        }
    }
public void rollback ( ) { TxId txId = null ; if ( ! getIsolationLevel ( ) . equals ( IsolationLevel . None ) ) { txId = TxManager . getTxIdFromThread ( ) ; List < TxOperation > alterations = txWrites . get ( txId ) ; if ( alterations != null ) { for ( TxOperation nextAlteration : alterations ) { nextAlteration . cancel ( false ) ; } } txWrites . remove ( txId ) ; } }
When operation in transactional mode causes any changes since the last commit to be dropped and never made
visible to the search method.