Package com.sleepycat.je

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


                for (String layerName : layerNames) {
                    createLayer(layerName, transaction);
                }
                transaction.commit();
            } catch (RuntimeException e) {
                transaction.abort();
                throw e;
            }
            return null;
        }
View Full Code Here


            Transaction transaction = entityStore.getEnvironment().beginTransaction(null, null);
            try {
                call(transaction);
                transaction.commit();
            } catch (RuntimeException e) {
                transaction.abort();
                throw e;
            }
            return null;
        }
View Full Code Here

                copyTileSets(transaction);
                DeleteLayer deleteCommand = new DeleteLayer(oldLayerName);
                deleteCommand.call(transaction);
                transaction.commit();
            } catch (RuntimeException e) {
                transaction.abort();
                throw e;
            }
            return null;
        }
View Full Code Here

                }
                tx.commit();
                return null;
            } catch (RuntimeException e) {
                e.printStackTrace();
                tx.abort();
                throw e;
            }
        }

        private void addToUsedQuota(final Transaction tx, final TileSet tileSet,
View Full Code Here

                    allStats.add(pageStats);
                }
                tx.commit();
                return allStats;
            } catch (RuntimeException e) {
                tx.abort();
                throw e;
            }
        }
    }
View Full Code Here

                    pageStatsById.putNoReturn(tx, pageStats);
                }
                tx.commit();
                return pageStats;
            } catch (Exception e) {
                tx.abort();
                throw e;
            }
        }
    }
View Full Code Here

      DatabaseEntry ph = new DatabaseEntry(publicHash);
      OperationStatus res = db.put(txn, USERS, ph);
      if (res != OperationStatus.SUCCESS) {
        log.severe("Could not add ph: " + res.toString());
        txn.abort();
        return false;
      }

      DatabaseEntry regDateKey = makeRegDateKey(publicHash);
      DatabaseEntry regTime = new DatabaseEntry(Util.long2bin(System.currentTimeMillis()));
View Full Code Here

      DatabaseEntry regDateKey = makeRegDateKey(publicHash);
      DatabaseEntry regTime = new DatabaseEntry(Util.long2bin(System.currentTimeMillis()));
      res = db.put(txn, regDateKey, regTime);
      if (res != OperationStatus.SUCCESS) {
        log.severe("Could not add regTime: " + res.toString());
        txn.abort();
        return false;
      }

      DatabaseEntry regPublicKeyKey = makePublicKeyKey(publicHash);
      DatabaseEntry regPublicKey = new DatabaseEntry(publicKey);
View Full Code Here

      DatabaseEntry regPublicKeyKey = makePublicKeyKey(publicHash);
      DatabaseEntry regPublicKey = new DatabaseEntry(publicKey);
      res = db.put(txn, regPublicKeyKey, regPublicKey);
      if (res != OperationStatus.SUCCESS) {
        log.severe("Could not add publicKey: " + res.toString());
        txn.abort();
        return false;
      }
      txn.commit();
      return true;
    } catch (DatabaseException e) {
View Full Code Here

      return true;
    } catch (DatabaseException e) {
      severe("Exception while adding user", e);
      try {
        if (txn != null) {
          txn.abort();
        }
      } catch (DatabaseException e1) {
        // we already had a failure, ignore this one.
      }
      return false;
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.