Package com.streambase.sb.operator
Interface ITupleDataInitializer
public interface ITupleDataInitializer
A class supporting input to output tuple data transfer
- Since:
- 11.1.0
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic interface
A class to perform additional tuple initialization from input to output -
Field Summary
Modifier and TypeFieldDescriptionstatic final ITupleDataInitializer.ITupleHandler
A no-operator handler -
Method Summary
Modifier and TypeMethodDescriptionvoid
fillOutputTuple
(Tuple inputTuple, Tuple outputTuple, ITupleDataInitializer.ITupleHandler handler) Fill the output tuple from the input value, process the tuple handler to updated additional fields in the output.Create a new output tuple.default Tuple
newOutputTuple
(Tuple inputTuple) Deprecated.default Tuple
newOutputTuple
(Tuple inputTuple, ITupleDataInitializer.ITupleHandler handler) Deprecated.Use a combination ofnewOutputTuple()
andfillOutputTuple(Tuple, Tuple, ITupleHandler)
-
Field Details
-
NO_OP_HANDLER
A no-operator handler
-
-
Method Details
-
newOutputTuple
Tuple newOutputTuple()Create a new output tuple.- Returns:
- A new output tuple, cleared.
- Since:
- 11.1.0
-
fillOutputTuple
void fillOutputTuple(Tuple inputTuple, Tuple outputTuple, ITupleDataInitializer.ITupleHandler handler) throws StreamBaseException Fill the output tuple from the input value, process the tuple handler to updated additional fields in the output.Tuple.clear()
the input tuple before returning.- Parameters:
inputTuple
- The input tupleoutputTuple
- The output tuplehandler
- The handler- Throws:
StreamBaseException
- The update failed- Since:
- 11.1.0
-
newOutputTuple
Deprecated.Use a combination ofnewOutputTuple()
andfillOutputTuple(Tuple, Tuple, ITupleHandler)
Create a new output tuple, transferring data from the input tuple to the output tuple. The input tuple has to be the input tuple received by the operatorOperator.processTuple(int, Tuple)
. It will getTuple.clear()
before the output tuple is returned.- Parameters:
inputTuple
- The input tuple- Returns:
- A new output tuple, created from the data from the input
- Throws:
StreamBaseException
- The tuple creation/initialization failed- Since:
- 11.1.0
-
newOutputTuple
default Tuple newOutputTuple(Tuple inputTuple, ITupleDataInitializer.ITupleHandler handler) throws StreamBaseException Deprecated.Use a combination ofnewOutputTuple()
andfillOutputTuple(Tuple, Tuple, ITupleHandler)
Create a new output tuple, transferring data from the input tuple to the output tuple. The input tuple has to be the input tuple received by the operatorOperator.processTuple(int, Tuple)
. It will getTuple.clear()
before the output tuple is returned. The handler parameter gives a chance to the caller to process additional tuple manipulations before the input is cleared. Do not use the handler to send the output downstream usingOperator.sendOutput(int, Tuple)
, only do tuple field assignments.- Parameters:
inputTuple
- The input tuplehandler
- The tuple handler- Returns:
- The new output tuple
- Throws:
StreamBaseException
- Something went wrong- Since:
- 11.1.0
-
newOutputTuple()
andfillOutputTuple(Tuple, Tuple, ITupleHandler)