Ejemplo n.º 1
0
    /** This implementation simply deletes each tuple it is handed. */
    public void process(Tuple tuple) throws IOException {

      // Make a copy of this, because once we delete the tuple, we can't
      // use the "tuple" variable anymore!
      TupleLiteral oldTuple = new TupleLiteral(tuple);

      eventDispatch.fireBeforeRowDeleted(tblFileInfo, tuple);
      tableMgr.deleteTuple(tblFileInfo, tuple);
      eventDispatch.fireAfterRowDeleted(tblFileInfo, oldTuple);
    }
Ejemplo n.º 2
0
 /**
  * Initialize the tuple-remover object with the details it needs to delete tuples from the
  * specified table.
  *
  * @param tblFileInfo details of the table that will be modified
  */
 public TupleRemover(TableFileInfo tblFileInfo) {
   this.tblFileInfo = tblFileInfo;
   this.tableMgr = tblFileInfo.getTableManager();
   this.eventDispatch = EventDispatcher.getInstance();
 }