Ejemplo n.º 1
0
 /**
  * Create a savepoint to allow rolling back to this state.
  *
  * @return the savepoint
  */
 public Savepoint setSavepoint() {
   Savepoint sp = new Savepoint();
   sp.logIndex = undoLog.size();
   if (database.getMvStore() != null) {
     sp.transactionSavepoint = getStatementSavepoint();
   }
   return sp;
 }
Ejemplo n.º 2
0
 /**
  * Create a savepoint that is linked to the current log position.
  *
  * @param name the savepoint name
  */
 public void addSavepoint(String name) {
   if (savepoints == null) {
     savepoints = database.newStringMap();
   }
   Savepoint sp = new Savepoint();
   sp.logIndex = undoLog.size();
   if (database.getMvStore() != null) {
     sp.transactionSavepoint = getStatementSavepoint();
   }
   savepoints.put(name, sp);
 }