Package edu.caltech.nanodb.commands
Class DeleteCommand.TupleRemover
- java.lang.Object
-
- edu.caltech.nanodb.commands.DeleteCommand.TupleRemover
-
- All Implemented Interfaces:
TupleProcessor
- Enclosing class:
- DeleteCommand
private static class DeleteCommand.TupleRemover extends java.lang.Object implements TupleProcessor
An implementation of the tuple processor interface used by theDeleteCommand
to delete each tuple.
-
-
Field Summary
Fields Modifier and Type Field Description private EventDispatcher
eventDispatcher
The event dispatcher for firing row-delete events.private TableInfo
tableInfo
The table whose tuples will be deleted.private TupleFile
tupleFile
-
Constructor Summary
Constructors Constructor Description TupleRemover(EventDispatcher eventDispatcher, TableInfo tableInfo)
Initialize the tuple-remover object with the details it needs to delete tuples from the specified table.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish()
This function is called when all tuples have been produced and passed to the tuple processor.void
process(Tuple tuple)
This implementation simply deletes each tuple it is handed.void
setSchema(Schema schema)
This tuple-processor implementation doesn't care about the schema.
-
-
-
Field Detail
-
tableInfo
private TableInfo tableInfo
The table whose tuples will be deleted.
-
tupleFile
private TupleFile tupleFile
-
eventDispatcher
private EventDispatcher eventDispatcher
The event dispatcher for firing row-delete events.
-
-
Constructor Detail
-
TupleRemover
TupleRemover(EventDispatcher eventDispatcher, TableInfo tableInfo)
Initialize the tuple-remover object with the details it needs to delete tuples from the specified table.- Parameters:
tableInfo
- details of the table that will be modified
-
-
Method Detail
-
setSchema
public void setSchema(Schema schema)
This tuple-processor implementation doesn't care about the schema.- Specified by:
setSchema
in interfaceTupleProcessor
-
process
public void process(Tuple tuple)
This implementation simply deletes each tuple it is handed.- Specified by:
process
in interfaceTupleProcessor
- Parameters:
tuple
- The tuple to process.
-
finish
public void finish()
Description copied from interface:TupleProcessor
This function is called when all tuples have been produced and passed to the tuple processor.- Specified by:
finish
in interfaceTupleProcessor
-
-