fullRuntime/src/sc/db/DBTransaction.java
public void flush() {
      commitTime = System.currentTimeMillis();
      while (operationList != null) {
         ArrayList<TxOperation> toApply = operationList;
         operationApplyList = toApply;
         operationList = null;
         operationIndex = null;

         int numOps = toApply.size();
         for (int i = 0; i < numOps; ) {
            TxOperation op = toApply.get(i);
            int nextIx = i+1;
            while (nextIx < numOps) {
               TxOperation nextOp = toApply.get(nextIx);
               if (op.addToBatch(nextOp)) {
                  if (!nextOp.removeOp())
                     DBUtil.error("Attempt to remove batched op failed");
                  toApply.remove(nextIx);
                  numOps--;
               }
               else
                  break;
            }
            if (op.removeOp())
               op.apply();
            else
               DBUtil.error("Attempt to flush operation not found in pendingOps for DBObject");
            i = nextIx;
         }
      }
   }
/**
    * Applies any queued operations. By default setting properties are queued until dbUpdate is called.
    * Inserts and deletes are applied immediate (and flush the queue of pending changes) but it's possible
    * to enable queuing of inserts and deletes as well.
    */
Applies any queued operations. By default setting properties are queued until dbUpdate is called.
Inserts and deletes are applied immediate (and flush the queue of pending changes) but it's possible
to enable queuing of inserts and deletes as well.
Applies any queued operations . By default setting properties are queued until dbUpdate is called . Inserts and deletes are applied immediate ( and flush the queue of pending changes ) but it ' s possible to enable queuing of inserts and deletes as well .
public void flush() {
      commitTime = System.currentTimeMillis();
      while (operationList != null) {
         ArrayList<TxOperation> toApply = operationList;
         operationApplyList = toApply;
         operationList = null;
         operationIndex = null;
         int numOps = toApply.size();
         for (int i = 0; i < numOps; ) {
            TxOperation op = toApply.get(i);
            int nextIx = i+1;
            while (nextIx < numOps) {
               TxOperation nextOp = toApply.get(nextIx);
               if (op.addToBatch(nextOp)) {
                  if (!nextOp.removeOp())
                     DBUtil.error("Attempt to remove batched op failed");
                  toApply.remove(nextIx);
                  numOps--;
               }
               else
                  break;
            }
            if (op.removeOp())
               op.apply();
            else
               DBUtil.error("Attempt to flush operation not found in pendingOps for DBObject");
            i = nextIx;
         }
      }
   }
public void flush ( ) { commitTime = System . currentTimeMillis ( ) ; while ( operationList != null ) { ArrayList < TxOperation > toApply = operationList ; operationApplyList = toApply ; operationList = null ; operationIndex = null ; int numOps = toApply . size ( ) ; for ( int i = 0 ; i < numOps ; ) { TxOperation op = toApply . get ( i ) ; int nextIx = i + 1 ; while ( nextIx < numOps ) { TxOperation nextOp = toApply . get ( nextIx ) ; if ( op . addToBatch ( nextOp ) ) { if ( ! nextOp . removeOp ( ) ) DBUtil . error ( "Attempt to remove batched op failed" ) ; toApply . remove ( nextIx ) ; numOps -- ; } else break ; } if ( op . removeOp ( ) ) op . apply ( ) ; else DBUtil . error ( "Attempt to flush operation not found in pendingOps for DBObject" ) ; i = nextIx ; } } }
Applies any queued operations.
Applies any queued operations .