com.ibm.streams.flow.declare
Interface OperatorInvocation<T>
-
- Type Parameters:
T
- Operator implementation type.
public interface OperatorInvocation<T>
Declaration of an invocation of a Java operator in anOperatorGraph
.If
T
is annotated withPrimitiveOperator
then the invocation of the operator must be consistent with the model defined by its annotations.- Since:
- InfoSphere® Streams Version 3.1
-
-
Method Summary
Methods Modifier and Type Method and Description InputPortDeclaration
addInput(OutputPortDeclaration outputPort)
Declare an input port that is connected to an output port.InputPortDeclaration
addInput(StreamSchema schema)
Declare an input port for this operator and generate the name of the port.InputPortDeclaration
addInput(java.lang.String schema)
Declare an input port for this operator and generate the name of the port.InputPortDeclaration
addInput(java.lang.String name, StreamSchema schema)
Declare an input port for this operator.InputPortDeclaration
addInput(java.lang.String name, java.lang.String schema)
Declare an input port for this operator.OutputPortDeclaration
addOutput(StreamSchema schema)
Declare an output port for this operator and generate the name of the port.OutputPortDeclaration
addOutput(java.lang.String schema)
Declare an output port for this operator and generate the name of the port.OutputPortDeclaration
addOutput(java.lang.String name, StreamSchema schema)
Declare an output port for this operator.OutputPortDeclaration
addOutput(java.lang.String name, java.lang.String schema)
Declare an output port for this operator.boolean
compileChecks()
Run compile checks against this invocation.boolean
compileChecks(boolean verbose)
Run compile checks against this invocation.java.lang.String
getName()
Get the complete name of the operator.java.lang.Class<T>
getOperatorClass()
Get the class representing this operator invocation.OperatorGraph
graph()
Return the graph for this operator invocation.OperatorInvocation<T>
setAttributeParameter(java.lang.String parameterName, java.lang.String... values)
Set a parameter to a list ofAttribute
names asString
values.OperatorInvocation<T>
setBigDecimalParameter(java.lang.String parameterName, java.math.BigDecimal... values)
Set a parameter to a list ofBigDecimal
values.OperatorInvocation<T>
setBooleanParameter(java.lang.String parameterName, boolean... values)
Set a parameter to a list ofboolean
values.OperatorInvocation<T>
setByteParameter(java.lang.String parameterName, byte... values)
Set a parameter to a list ofbyte
values.OperatorInvocation<T>
setCustomLiteralParameter(java.lang.String parameterName, java.lang.Enum<?>... values)
Set a custom literal parameter to a list ofEnum
values.OperatorInvocation<T>
setDoubleParameter(java.lang.String parameterName, double... values)
Set a parameter to a list ofdouble
values.OperatorInvocation<T>
setFloatParameter(java.lang.String parameterName, float... values)
Set a parameter to a list offloat
values.OperatorInvocation<T>
setIntParameter(java.lang.String parameterName, int... values)
Set a parameter to a list ofint
values.OperatorInvocation<T>
setLongParameter(java.lang.String parameterName, long... values)
Set a parameter to a list oflong
values.OperatorInvocation<T>
setShortParameter(java.lang.String parameterName, short... values)
Set a parameter to a list ofshort
values.OperatorInvocation<T>
setStringParameter(java.lang.String parameterName, java.lang.String... values)
Set a parameter to a list ofString
values.
-
-
-
Method Detail
-
setStringParameter
OperatorInvocation<T> setStringParameter(java.lang.String parameterName, java.lang.String... values)
Set a parameter to a list ofString
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setIntParameter
OperatorInvocation<T> setIntParameter(java.lang.String parameterName, int... values)
Set a parameter to a list ofint
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setBooleanParameter
OperatorInvocation<T> setBooleanParameter(java.lang.String parameterName, boolean... values)
Set a parameter to a list ofboolean
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setByteParameter
OperatorInvocation<T> setByteParameter(java.lang.String parameterName, byte... values)
Set a parameter to a list ofbyte
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setShortParameter
OperatorInvocation<T> setShortParameter(java.lang.String parameterName, short... values)
Set a parameter to a list ofshort
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setLongParameter
OperatorInvocation<T> setLongParameter(java.lang.String parameterName, long... values)
Set a parameter to a list oflong
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setFloatParameter
OperatorInvocation<T> setFloatParameter(java.lang.String parameterName, float... values)
Set a parameter to a list offloat
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setDoubleParameter
OperatorInvocation<T> setDoubleParameter(java.lang.String parameterName, double... values)
Set a parameter to a list ofdouble
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setBigDecimalParameter
OperatorInvocation<T> setBigDecimalParameter(java.lang.String parameterName, java.math.BigDecimal... values)
Set a parameter to a list ofBigDecimal
values.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setAttributeParameter
OperatorInvocation<T> setAttributeParameter(java.lang.String parameterName, java.lang.String... values)
Set a parameter to a list ofAttribute
names asString
values. The values must be specified as InputPortName.AttributeName or as AttributeName if the attribute name is unique in the schema. AnIllegalArgumentException
will be thrown if a valid attribute with the given name does not exist.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
setCustomLiteralParameter
OperatorInvocation<T> setCustomLiteralParameter(java.lang.String parameterName, java.lang.Enum<?>... values)
Set a custom literal parameter to a list ofEnum
values. Note that theEnum#name()
method must return a string that is accepted by this custom literal parameter.- Parameters:
parameterName
- Parameter name.values
- List of values.- Returns:
- this
-
addOutput
OutputPortDeclaration addOutput(java.lang.String name, java.lang.String schema)
Declare an output port for this operator. This method is equivalent to theaddOutput(String, StreamSchema)
method after the SPL representation ofschema
is converted to aStreamSchema
object.- Parameters:
name
- Name of the output port.schema
- Schema of the output port as a string that uses SPL syntax.- Returns:
- An
OutputPortDeclaration
that represents the output port. - See Also:
Type.Factory.getTupleType(String)
-
addOutput
OutputPortDeclaration addOutput(java.lang.String name, StreamSchema schema)
Declare an output port for this operator. The index of this output port is equal to the number of previously declared output ports for this invocation.- Parameters:
name
- Name of the output port.schema
- Schema of the output port.- Returns:
- An
OutputPortDeclaration
that represents the output port.
-
addOutput
OutputPortDeclaration addOutput(java.lang.String schema)
Declare an output port for this operator and generate the name of the port. This method is equivalent toaddOutput(StreamSchema)
method after the SPL representation ofschema
is converted to aStreamSchema
object- Parameters:
schema
- Schema of the output port.- Returns:
- An
OutputPortDeclaration
that represents the output port. - See Also:
Type.Factory.getTupleType(String)
-
addOutput
OutputPortDeclaration addOutput(StreamSchema schema)
Declare an output port for this operator and generate the name of the port. This method is equivalent toaddOutput(String, StreamSchema)
with a generated name that is unique within this invocation.- Parameters:
schema
- Schema of the output port.- Returns:
- An
OutputPortDeclaration
that represents the output port.
-
addInput
InputPortDeclaration addInput(java.lang.String name, StreamSchema schema)
Declare an input port for this operator. The index of this input port is equal to the number of previously declared input ports for this invocation.- Parameters:
name
- Name of the input port.schema
- Schema of the input port.- Returns:
- An
InputPortDeclaration
that represents the input port.
-
addInput
InputPortDeclaration addInput(java.lang.String name, java.lang.String schema)
Declare an input port for this operator. This method is equivalent toaddOutput(String, StreamSchema)
method after the SPL representation ofschema
is converted to aStreamSchema
object- Parameters:
name
- Name of the input port.schema
- Schema of the input port as a string that uses SPL syntax.- Returns:
- An
InputPortDeclaration
that represents the input port. - See Also:
Type.Factory.getTupleType(String)
-
addInput
InputPortDeclaration addInput(java.lang.String schema)
Declare an input port for this operator and generate the name of the port. This method is equivalent toaddInput(StreamSchema)
method after the SPL representation ofschema
is converted to aStreamSchema
object- Parameters:
schema
- Schema of the input port.- Returns:
- An
InputPortDeclaration
that represents the input port. - See Also:
Type.Factory.getTupleType(String)
-
addInput
InputPortDeclaration addInput(StreamSchema schema)
Declare an input port for this operator and generate the name of the port. This method is equivalent toaddOutput(String, StreamSchema)
with a generated name that is unique within this invocation.- Parameters:
schema
- Schema of the input port.- Returns:
- An
InputPortDeclaration
that represents the input port.
-
addInput
InputPortDeclaration addInput(OutputPortDeclaration outputPort)
Declare an input port that is connected to an output port.
The name of the input port is equal tooutputPort.getName()
.
The schema of the input port is equal tooutputPort.getStreamSchema()
.
The index of this input port is equal to the number of previously declared input ports for this invocation.- Parameters:
outputPort
- Output port to connect to.- Returns:
- An
InputPortDeclaration
that represents the input port.
-
compileChecks
boolean compileChecks(boolean verbose) throws java.lang.Exception
Run compile checks against this invocation.- Parameters:
verbose
-- Returns:
- True if the context is valid, which means all the checks passed. Otherwise false.
- Throws:
java.lang.Exception
- Exception thrown by a compile time check.
-
compileChecks
boolean compileChecks() throws java.lang.Exception
Run compile checks against this invocation. Equivalent to callingcompileChecks(boolean)
and passingfalse
.- Returns:
- True if the context is valid, which means all the checks passed. Otherwise false.
- Throws:
java.lang.Exception
- Exception thrown by a compile time check.
-
getName
java.lang.String getName()
Get the complete name of the operator.- Returns:
- complete name of the operator.
-
graph
OperatorGraph graph()
Return the graph for this operator invocation.- Returns:
- the graph for this operator invocation
-
getOperatorClass
java.lang.Class<T> getOperatorClass()
Get the class representing this operator invocation.- Returns:
- Class representing this operator invocation.
- Since:
- InfoSphere® Streams Version 3.2
-
-