com.ibm.streams.operator.window
Class AbstractWindowOperator
- java.lang.Object
-
- com.ibm.streams.operator.AbstractOperator
-
- com.ibm.streams.operator.window.AbstractWindowOperator
-
- All Implemented Interfaces:
- Operator
public class AbstractWindowOperator extends AbstractOperator
Abstract operator that forces all tuple processing to be through window event handling.- See Also:
StreamWindowListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.ibm.streams.operator.Operator
Operator.TagNames
-
-
Field Summary
Fields Modifier and Type Field and Description static java.lang.String
IBM_COPYRIGHT
-
Constructor Summary
Constructors Constructor and Description AbstractWindowOperator()
-
Method Summary
Methods Modifier and Type Method and Description void
initialize(OperatorContext context)
Initialize this operator.void
process(StreamingInput<Tuple> stream, Tuple tuple)
Final method that does nothing, all tuple processing will be handled through the registered instances ofStreamWindowListener
.void
processPunctuation(StreamingInput<Tuple> stream, StreamingData.Punctuation mark)
Empty method, punctuation processing is handled through the registered instances ofStreamWindowListener
.-
Methods inherited from class com.ibm.streams.operator.AbstractOperator
allPortsReady, checkPorts, createAvoidCompletionThread, createAvoidCompletionThread, createAvoidCompletionThreadIfNoInputs, getControlPlaneContext, getInput, getOperatorContext, getOutput, setLoggerAspects, setTagData, shutdown
-
-
-
-
Field Detail
-
IBM_COPYRIGHT
public static final java.lang.String IBM_COPYRIGHT
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(OperatorContext context) throws java.lang.Exception
Initialize this operator. Called once before any tuples are processed.This implementation initializes the operator to ensure its utility methods return the correct information.
Sub-classes must call
super.initialize(context)
if they override this method.This implementation validates every input port is windowed.
Sub-classes must register a
StreamWindowListener
for each input port usingStreamWindow.registerListener(StreamWindowListener, boolean)
.- Specified by:
initialize
in interfaceOperator
- Overrides:
initialize
in classAbstractOperator
- Parameters:
context
- OperatorContext for this operator.- Throws:
java.lang.Exception
- Operator failure, will cause the enclosing PE to terminate.
-
process
public final void process(StreamingInput<Tuple> stream, Tuple tuple)
Final method that does nothing, all tuple processing will be handled through the registered instances ofStreamWindowListener
.- Specified by:
process
in interfaceOperator
- Overrides:
process
in classAbstractOperator
- Parameters:
stream
- Port the tuple is arriving on.tuple
- Object representing the incoming tuple.
-
processPunctuation
public void processPunctuation(StreamingInput<Tuple> stream, StreamingData.Punctuation mark) throws java.lang.Exception
Empty method, punctuation processing is handled through the registered instances ofStreamWindowListener
.Sub-classes may need to override this to perform any processing for
StreamingData.Punctuation.FINAL_MARKER
marks, when such marks are not automatically propagated to the output ports.- Specified by:
processPunctuation
in interfaceOperator
- Overrides:
processPunctuation
in classAbstractOperator
- Parameters:
stream
- Port punctuation mark arrived onmark
- value of mark- Throws:
java.lang.Exception
- Operator failure, will cause the enclosing PE to terminate.
-
-