public class Sink extends UnaryOperator
tupleCounter
Constructor and Description |
---|
Sink()
Default constructor.
|
Sink(Operator operator,
StorageManager sm,
java.lang.String filename)
Constructs a new sink operator.
|
Modifier and Type | Method and Description |
---|---|
protected void |
cleanup()
Cleans up after all processing.
|
protected java.util.List<Tuple> |
innerGetNext()
The inner method to retrieve tuples
|
protected java.util.List<Tuple> |
innerProcessTuple(Tuple tuple,
int inOp)
Operator abstract interface -- never called.
|
protected Relation |
setOutputRelation()
Operator abstract interface -- sets the ouput relation of
this sink operator.
|
protected void |
setup()
Sets up this sink operator.
|
java.lang.String |
toStringSingle()
Textual representation
|
getInputOperator
allDone, getInputOperator, getMultiNext, getNext, getNumberOfInputs, getOutputRelation, prefix, processTuple, setInputs, toString, toString, tuples
public Sink() throws EngineException
EngineException
- whenever the operator cannot be
constructed.public Sink(Operator operator, StorageManager sm, java.lang.String filename) throws EngineException
operator
- the input operator to this sink.sm
- this sink's storage manager.filename
- the name of the file where the data will be
storedEngineException
- thrown whenever the operator cannot be
properly initialised.protected void setup() throws EngineException
setup
in class Operator
EngineException
- whenever the sink cannot be set up.protected void cleanup() throws EngineException
cleanup
in class Operator
EngineException
- thrown whenever the operator cannot
clean up.protected java.util.List<Tuple> innerGetNext() throws EngineException
innerGetNext
in class Operator
EngineException
- thrown whenever the next iteration is not
possible.protected java.util.List<Tuple> innerProcessTuple(Tuple tuple, int inOp) throws EngineException
innerProcessTuple
in class Operator
tuple
- the tuple to be processed.inOp
- the index of the input operator the tuple to be
processed belongs to.EngineException
- thrown whenever there is something wrong
with processing the tuple.protected Relation setOutputRelation() throws EngineException
setOutputRelation
in class Operator
EngineException
- whenever the output relation of this
operator cannot be set.public java.lang.String toStringSingle()
toStringSingle
in class Operator