- 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 RecordPort
inputPort
protected RecordPort
outputPort
-
Constructor Summary
Constructors Constructor Description SortedGroupHandler()
Default constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected RecordInput
current(ExecutionContext ctx)
Returns the current copy of the input portprotected void
execute(ExecutionContext ctx)
Final execute method, subclasses should override the various abstract methods of this class to receive events.RecordPort
getInput()
Returns the input portString[]
getKeys()
Returns the keys to be used for detecting group boundariesprotected int
getNumInputCopies(LogicalPort port)
Overridden to declare that we require 2 copies of inputRecordPort
getOutput()
Returns the output portprotected RecordInput
lookahead(ExecutionContext ctx)
Returns the lookahead copy of the input portvoid
setKeys(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:PipelineOperator
Returns the input port- Specified by:
getInput
in interfacePipelineOperator<RecordPort>
- Returns:
- the input port
-
getOutput
public final RecordPort getOutput()
Description copied from interface:PipelineOperator
Returns the output port- Specified by:
getOutput
in 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:
execute
in classExecutableOperator
- Parameters:
ctx
- the execution context
-
getNumInputCopies
protected int getNumInputCopies(LogicalPort port)
Overridden to declare that we require 2 copies of input- Overrides:
getNumInputCopies
in 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
-
-