Search in sources :

Example 51 with GridNearTxLocal

use of org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal in project ignite by apache.

the class HibernateReadWriteAccessStrategy method rollbackCurrentTx.

/**
 * Roll backs current transaction.
 */
private void rollbackCurrentTx() {
    try {
        TxContext ctx = txCtx.get();
        if (ctx != null) {
            txCtx.remove();
            GridNearTxLocal tx = cache.tx();
            if (tx != null)
                tx.proxy().rollback();
        }
    } catch (IgniteException e) {
        log.error("Failed to rollback cache transaction.", e);
    }
}
Also used : IgniteException(org.apache.ignite.IgniteException) GridNearTxLocal(org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal)

Aggregations

GridNearTxLocal (org.apache.ignite.internal.processors.cache.distributed.near.GridNearTxLocal)51 IgniteCheckedException (org.apache.ignite.IgniteCheckedException)21 IgniteUuid (org.apache.ignite.lang.IgniteUuid)10 IgniteException (org.apache.ignite.IgniteException)9 Map (java.util.Map)8 Nullable (org.jetbrains.annotations.Nullable)8 HashMap (java.util.HashMap)7 GridClosureException (org.apache.ignite.internal.util.lang.GridClosureException)7 TreeSet (java.util.TreeSet)6 UUID (java.util.UUID)6 Callable (java.util.concurrent.Callable)6 ClusterNode (org.apache.ignite.cluster.ClusterNode)5 IgfsException (org.apache.ignite.igfs.IgfsException)5 IgfsPathNotFoundException (org.apache.ignite.igfs.IgfsPathNotFoundException)5 IgniteInternalFuture (org.apache.ignite.internal.IgniteInternalFuture)5 ArrayList (java.util.ArrayList)4 HashSet (java.util.HashSet)4 EVT_NODE_LEFT (org.apache.ignite.events.EventType.EVT_NODE_LEFT)4 IgfsPathAlreadyExistsException (org.apache.ignite.igfs.IgfsPathAlreadyExistsException)4 IgfsPathIsDirectoryException (org.apache.ignite.igfs.IgfsPathIsDirectoryException)4