- java.lang.Object
-
- com.pervasive.datarush.operators.AbstractLogicalOperator
-
- com.pervasive.datarush.operators.StreamingOperator
-
- com.pervasive.datarush.operators.ExecutableOperator
-
- com.pervasive.datarush.operators.group.SortedGroupHandler
-
- All Implemented Interfaces:
LogicalOperator,PipelineOperator<RecordPort>,RecordPipelineOperator
public abstract class SortedGroupHandler extends ExecutableOperator implements RecordPipelineOperator
Common base class for all processes that need to detect group boundaries
-
-
Field Summary
Fields Modifier and Type Field Description protected RecordPortinputPortprotected RecordPortoutputPort
-
Constructor Summary
Constructors Constructor Description SortedGroupHandler()Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RecordInputcurrent(ExecutionContext ctx)Returns the current copy of the input portprotected voidexecute(ExecutionContext ctx)Final execute method, subclasses should override the various abstract methods of this class to receive events.RecordPortgetInput()Returns the input portString[]getKeys()Returns the keys to be used for detecting group boundariesprotected intgetNumInputCopies(LogicalPort port)Overridden to declare that we require 2 copies of inputRecordPortgetOutput()Returns the output portprotected RecordInputlookahead(ExecutionContext ctx)Returns the lookahead copy of the input portvoidsetKeys(String[] keys)Sets the keys to be used for detecting group boundaries-
Methods inherited from class com.pervasive.datarush.operators.ExecutableOperator
cloneForExecution, getPortSettings, handleInactiveOutput
-
Methods inherited from class com.pervasive.datarush.operators.StreamingOperator
computeMetadata
-
Methods inherited from class com.pervasive.datarush.operators.AbstractLogicalOperator
disableParallelism, getInputPorts, getOutputPorts, newInput, newInput, newOutput, newRecordInput, newRecordInput, newRecordOutput, notifyError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.pervasive.datarush.operators.LogicalOperator
disableParallelism, getInputPorts, getOutputPorts
-
-
-
-
Field Detail
-
inputPort
protected final RecordPort inputPort
-
outputPort
protected final RecordPort outputPort
-
-
Method Detail
-
getKeys
public final String[] getKeys()
Returns the keys to be used for detecting group boundaries- Returns:
- the key fields on which data is grouped
-
setKeys
public final void setKeys(String[] keys)
Sets the keys to be used for detecting group boundaries- Parameters:
keys- key fields on which data is grouped
-
getInput
public final RecordPort getInput()
Description copied from interface:PipelineOperatorReturns the input port- Specified by:
getInputin interfacePipelineOperator<RecordPort>- Returns:
- the input port
-
getOutput
public final RecordPort getOutput()
Description copied from interface:PipelineOperatorReturns the output port- Specified by:
getOutputin interfacePipelineOperator<RecordPort>- Returns:
- the output port
-
execute
protected final void execute(ExecutionContext ctx)
Final execute method, subclasses should override the various abstract methods of this class to receive events.- Specified by:
executein classExecutableOperator- Parameters:
ctx- the execution context
-
getNumInputCopies
protected int getNumInputCopies(LogicalPort port)
Overridden to declare that we require 2 copies of input- Overrides:
getNumInputCopiesin classExecutableOperator- Parameters:
port- the port- Returns:
- the number of input copies for the port
-
current
protected final RecordInput current(ExecutionContext ctx)
Returns the current copy of the input port- Parameters:
ctx- the execution context- Returns:
- the current copy of the input port
-
lookahead
protected final RecordInput lookahead(ExecutionContext ctx)
Returns the lookahead copy of the input port- Parameters:
ctx- the execution context- Returns:
- the current copy of the input port
-
-