Package com.sleepycat.je

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


                 * ReplicaWriteException invalidates the transaction, and there
                 * are no writes to commit anyway. [#16655]
                 */
                if (txn != null) {
                    if (success && !isReadOnly()) {
                        txn.commit();
                    } else {
                        txn.abort();
                    }
                }
            }
View Full Code Here


        } finally {
            if (cursor != null) {
                cursor.close();
            }
            if (txn != null) {
                txn.commit();
            }
        }
    }

    private static byte[] incrementID(byte[] key) {
View Full Code Here

            changeSet = (changeSetData.getData() == null) ?
                new LogChangeSet() : binding.entryToObject(changeSetData);
            success = true;
        } finally {
           if (success) {
              txn.commit();
           } else {
              txn.abort();
           }
        }
    }
View Full Code Here

                (env, txn, DbType.SYNC.getInternalName(), dbConfig);
            dbImpl = DbInternal.getDatabaseImpl(db);
            success = true;
        } finally {
            if (success) {
                txn.commit();
            } else {
                txn.abort();
            }
        }
    }
View Full Code Here

                success = true;
            } finally {
                dbConfig.setAllowCreate(saveAllowCreate);
                if (success) {
                    if (txn != null) {
                        txn.commit();
                    }
                } else {
                    if (txn != null) {
                        txn.abort();
                    }
View Full Code Here

                    /* Treat this as if the database does not exist. */
                /* <!-- end JE only --> */
                } finally {
                    if (success) {
                        if (txn != null) {
                            txn.commit();
                        }
                    } else {
                        if (txn != null) {
                            txn.abort();
                        }
View Full Code Here

                    }
                }
                if (txn != null && nWritten >= WRITES_PER_TXN) {
                    cursor.close();
                    cursor = null;
                    txn.commit();
                    txn = null;
                    txn = env.beginTransaction(null, autoCommitTxnConfig);
                    cursor = db.openCursor(txn, cursorConfig);
                    DatabaseEntry saveKey = KeyRange.copy(key);
                    status = cursor.getSearchKeyRange(key, data, null);
View Full Code Here

            if (cursor != null) {
                cursor.close();
            }
            if (txn != null) {
                if (nWritten > 0) {
                    txn.commit();
                } else {
                    txn.abort();
                }
            }
        }
View Full Code Here

      {
        for (Operation operation: operations)
        {
          operation.execute(env, transaction);
        }
        transaction.commit();
      }
      catch (RuntimeException e)
      {
        transaction.abort();
        throw e;
View Full Code Here

          if (status != OperationStatus.SUCCESS) {
            throw new RuntimeException("put() non-success status");
          }
        }
        cursor.close();
        txn.commit();
      } catch (DatabaseException e) {
        if(txn != null) {
          txn.abort();
        }
        e.printStackTrace();
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.