java.lang.Object
com.pervasive.datarush.operators.AbstractLogicalOperator
- All Implemented Interfaces:
LogicalOperator
- Direct Known Subclasses:
CompositeOperator,IterativeOperator,StreamingOperator
Base class for all LogicalOperators. Implementation must not extend
this class directly; instead they must extend one of the following
sub-classes:
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionfinal voidCan be called to forcible disable parallelism for the given operator (and children if this is aCompositeOperator).final Namespace<LogicalPort>Returns the list of input ports.final Namespace<LogicalPort>Returns the list of output ports.protected final <T extends LogicalPort>
TnewInput(String name, LogicalPortFactory<T> factory) Creates a new input port.protected final <T extends LogicalPort>
TnewInput(String name, LogicalPortFactory<T> factory, boolean optional) Creates a new input port.protected final <T extends LogicalPort>
TnewOutput(String name, LogicalPortFactory<T> factory) Creates a new output port.protected final RecordPortnewRecordInput(String name) Creates a new record input port.protected final RecordPortnewRecordInput(String name, boolean optional) Creates a new record input port.protected final RecordPortnewRecordOutput(String name) Creates a new record output port.protected voidCalled to notify the operator that the graph terminated abnormally either before the operator had a chance to run or while the operator is running.
-
Method Details
-
getInputPorts
Description copied from interface:LogicalOperatorReturns the list of input ports. This method is generally used by framework code; operator consumers should generally use the methodsgetInput(), etc to obtain a handle to input ports.- Specified by:
getInputPortsin interfaceLogicalOperator- Returns:
- the list of input ports
-
getOutputPorts
Description copied from interface:LogicalOperatorReturns the list of output ports. This method is generally used by framework code; operator consumers should generally use the methodsgetOutput(), etc to obtain a handle to input ports.- Specified by:
getOutputPortsin interfaceLogicalOperator- Returns:
- the list of output ports
-
disableParallelism
public final void disableParallelism()Description copied from interface:LogicalOperatorCan be called to forcible disable parallelism for the given operator (and children if this is aCompositeOperator). This method should be used sparingly since it will degrade performance significantly; but is needed in certain cases. For example:- If there is a
RunScriptoperator that contains a non-parallelizable script - If there is a
DeriveFieldsoperator that contains a non-parallelizable function
- Specified by:
disableParallelismin interfaceLogicalOperator
- If there is a
-
notifyError
Called to notify the operator that the graph terminated abnormally either before the operator had a chance to run or while the operator is running. If this is aCompositeOperator, this method will be invoked if any of the components- Parameters:
e- the error that occured
-
newRecordInput
Creates a new record input port. The result should be assigned to a private final variable and exposed through a public getter.- Parameters:
name- the name of the port, must be unique within the operator.- Returns:
- a new record input port.
- See Also:
-
newRecordInput
Creates a new record input port. The result should be assigned to a private final variable and exposed through a public getter.- Parameters:
name- the name of the port, must be unique within the operator.optional- whether the port is optional.- Returns:
- a new record input port.
- See Also:
-
newInput
Creates a new input port. The result should be assigned to a private final variable and exposed through a public getter.- Type Parameters:
T- the type of the port- Parameters:
name- the name of the port, must be unique within the operator.factory- the factory, determines the type of the port- Returns:
- a new input port.
- See Also:
-
newInput
protected final <T extends LogicalPort> T newInput(String name, LogicalPortFactory<T> factory, boolean optional) Creates a new input port. The result should be assigned to a private final variable and exposed through a public getter.- Type Parameters:
T- the type of the port- Parameters:
name- the name of the port, must be unique within the operator.factory- the factory, determines the type of the portoptional- whether the port is optional- Returns:
- a new input port.
- See Also:
-
newRecordOutput
Creates a new record output port. The result should be assigned to a private final variable and exposed through a public getter.- Parameters:
name- the name of the port, must be unique within the operator.- Returns:
- a new record output port.
- See Also:
-
newOutput
Creates a new output port. The result should be assigned to a private final variable and exposed through a public getter.- Type Parameters:
T- the type of the port- Parameters:
name- the name of the port, must be unique within the operator.factory- the factory, determines the type of the port- Returns:
- a new output port.
- See Also:
-