Package com.sleepycat.je

Examples of com.sleepycat.je.Transaction.abort()


         if (trace) log.tracef("%s sleepycat transaction %s", commit ? "committing" : "aborting", txn);
         try {
            if (commit)
               txn.commit();
            else
               txn.abort();
         } catch (Exception caught) {
            throw convertToCacheLoaderException("Problem completing transaction", caught);
         }
      } else {
         if (trace) log.tracef("no sleepycat transaction associated  transaction %s", tx);
View Full Code Here


        } finally {
            cursor.close();
            if (success) {
                txn.commit();
            } else {
                txn.abort();
            }
        }

        /* Checkpoint to reset the memory budget. */
        env.checkpoint(new CheckpointConfig().setForce(true));
View Full Code Here

            doPut(txn, modifications);
            return txn;
         }
         catch (Exception e)
         {
            txn.abort();
            if (e instanceof DeadlockException && retries > 0)
            {
               retries -= 1;
            }
            else
View Full Code Here

      Transaction txn = txnMap.remove(tx);
      if (txn != null)
      {
         try
         {
            txn.abort();
         }
         catch (Exception ignored)
         {
         }
      }
View Full Code Here

             * If master, start a transaction as a way of ascertaining whether
             * all nodes are up. Since the ReplicaAckPolicy is ALL, the
             * transaction will only begin when all the nodes are available.
             */
            Transaction txn = repEnv.beginTransaction(null, null);
            txn.abort();

            /* Invoke the group shutdown API. */
            repEnv.shutdownGroup(timeout, TimeUnit.SECONDS);
        } else if (repEnv.getState().isReplica()) {
            for (long i = 0; i < timeout; i++) {
View Full Code Here

                 */
                if (txn != null) {
                    if (success && !isReadOnly()) {
                        txn.commit();
                    } else {
                        txn.abort();
                    }
                }
            }
        }
    }
View Full Code Here

                 */
                if (txn != null) {
                    if (success && !isReadOnly()) {
                        txn.commit();
                    } else {
                        txn.abort();
                    }
                }
            }
        }
    }
View Full Code Here

            success = true;
        } finally {
           if (success) {
              txn.commit();
           } else {
              txn.abort();
           }
        }
    }

    /*
 
View Full Code Here

            success = true;
        } finally {
            if (success) {
                txn.commit();
            } else {
                txn.abort();
            }
        }
    }

    /*
 
View Full Code Here

                    if (txn != null) {
                        txn.commit();
                    }
                } else {
                    if (txn != null) {
                        txn.abort();
                    }
                    priOpenState.undoState();
                }
            }
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.