Package com.sleepycat.je

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


          }
        }
      } finally {
        cursor.close();
      }
      txn.commit();
      return collection;

    } catch (DatabaseException e) {
      severe("Exception while getting record", e);
      try {
View Full Code Here


          indices.add(index.getData());
        }
      } finally {
        cursor.close();
      }
      txn.commit();
      return indices;
    } catch (DatabaseException e) {
      try {
        if (cursor != null)
          cursor.close();
View Full Code Here

          revisions.add(revision.getData());
        }
      } finally {
        cursor.close();
      }
      txn.commit();
      if (revisions.size() == 0){
        return null;
      }
      return revisions;
    } catch (DatabaseException e) {
View Full Code Here

      if (OperationStatus.SUCCESS != putValue){
        txn.abort();
        log.warning("Could not put value: " + putValue.toString());
        return false;
      }
      txn.commit();
      return true;
    } catch (DatabaseException e){
      severe("Exception while putting record", e);
      try {
        if (txn != null)
View Full Code Here

      }
      } finally {
        cursor.close();
      }
      result |= deleteRevisions(user, key, txn);
      txn.commit();
      return result;
    } catch (DatabaseException e) {
      severe("Exception while deleting record", e);
      try {
        if (txn != null)
View Full Code Here

        cursor = db.openCursor(readerTxn, null);
        status = cursor.getLast(key, data, null);
        assertEquals(OperationStatus.SUCCESS, status);
        assertEquals(1, IntegerBinding.entryToInt(key));
        cursor.close();
        readerTxn.commit();

        closeEnv();
    }
   
    public void testGetLast_NotFound_Dup()
View Full Code Here

        status = cursor.getLast(key, data, null);
        assertEquals(OperationStatus.SUCCESS, status);
        assertEquals(1, IntegerBinding.entryToInt(key));
        assertEquals(1, IntegerBinding.entryToInt(data));
        cursor.close();
        readerTxn.commit();

        closeEnv();
    }
   
    public void testGetNext_Success()
View Full Code Here

        assertEquals(OperationStatus.SUCCESS, searchKey(cursor, 1));
        status = cursor.getNext(key, data, null);
        assertEquals(OperationStatus.SUCCESS, status);
        assertEquals(2, IntegerBinding.entryToInt(key));
        cursor.close();
        readerTxn.commit();

        closeEnv();
    }
   
    public void testGetNext_Success_Dup()
View Full Code Here

        status = cursor.getNext(key, data, null);
        assertEquals(OperationStatus.SUCCESS, status);
        assertEquals(1, IntegerBinding.entryToInt(key));
        assertEquals(2, IntegerBinding.entryToInt(data));
        cursor.close();
        readerTxn.commit();

        closeEnv();
    }
   
    public void testGetNext_NotFound()
View Full Code Here

        assertEquals(OperationStatus.SUCCESS, searchKey(cursor, 1));
        status = cursor.getNext(key, data, null);
        assertEquals(OperationStatus.SUCCESS, status);
        assertEquals(2, IntegerBinding.entryToInt(key));
        cursor.close();
        readerTxn.commit();

        closeEnv();
    }
   
    public void testGetNext_NotFound_Dup()
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.