Ejemplo n.º 1
0
  /** Discards the indicated blocks and notify the owner. */
  private void discardBlocks(ArrayList<BlockIo> blocks) throws IOException {
    for (BlockIo cur : blocks) {

      cur.decrementTransactionCount();
      if (!cur.isInTransaction()) {
        owner.releaseFromTransaction(cur, false);
      }
    }
  }
Ejemplo n.º 2
0
 /** Synchronizes the indicated blocks with the owner. */
 private void synchronizeBlocks(Iterable<BlockIo> blocks, boolean fromCore) throws IOException {
   // write block vector elements to the data file.
   for (BlockIo cur : blocks) {
     owner.synch(cur);
     if (fromCore) {
       cur.decrementTransactionCount();
       if (!cur.isInTransaction()) {
         owner.releaseFromTransaction(cur, true);
       }
     }
   }
 }