Package edu.caltech.nanodb.commands
Class DumpCommand.TupleExporter
- java.lang.Object
-
- edu.caltech.nanodb.commands.DumpCommand.TupleExporter
-
- All Implemented Interfaces:
TupleProcessor
- Enclosing class:
- DumpCommand
protected static class DumpCommand.TupleExporter extends java.lang.Object implements TupleProcessor
A tuple processor implementation used to dump each tuple.
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.PrintStream
dumpOut
-
Constructor Summary
Constructors Constructor Description TupleExporter(java.io.PrintStream dumpOut)
Initialize the tuple-exporter object with the details it needs to print out 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 prints out each tuple it is handed.void
setSchema(Schema schema)
The exporter can output the schema to the dump file.
-
-
-
Method Detail
-
setSchema
public void setSchema(Schema schema)
The exporter can output the schema to the dump file.- Specified by:
setSchema
in interfaceTupleProcessor
-
process
public void process(Tuple tuple)
This implementation simply prints out 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
-
-