*
* @param tx
*/
private void rollback(GlobalTransaction tx)
{
TransactionEntry entry = tx_table.get(tx);
if (log.isTraceEnabled())
log.trace("called to rollback cache with GlobalTransaction=" + tx);
if (entry == null)
{
log.error("entry for transaction " + tx + " not found (transaction has possibly already been rolled back)");
return;
}
Iterator removedNodes = entry.getRemovedNodes().iterator();
while (removedNodes.hasNext())
{
Fqn f = (Fqn) removedNodes.next();
cache.realRemove(f, false);
}
// Revert the modifications by running the undo-op list in reverse. This *cannot* throw any exceptions !
entry.undoOperations(cache);
}