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 an OperatorGraph.

    If T is annotated with PrimitiveOperator then the invocation of the operator must be consistent with the model defined by its annotations.

    Since:
    InfoSphere® Streams Version 3.1
    • Method Detail

      • setStringParameter

        OperatorInvocation<T> setStringParameter(java.lang.String parameterName,
                                               java.lang.String... values)
        Set a parameter to a list of String 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 of int 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 of boolean 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 of byte 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 of short 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 of long 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 of float 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 of double 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 of BigDecimal 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 of Attribute names as String values. The values must be specified as InputPortName.AttributeName or as AttributeName if the attribute name is unique in the schema. An IllegalArgumentException 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 of Enum values. Note that the Enum#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,
                                      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.
      • 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(OutputPortDeclaration outputPort)
        Declare an input port that is connected to an output port.
        The name of the input port is equal to outputPort.getName().
        The schema of the input port is equal to outputPort.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 calling compileChecks(boolean) and passing false.
        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