Package com.ibm.streams.operator

Java Operator API for InfoSphere Streams.

See: Description

  • Interface Summary 
    Interface Description
    Attribute
    Meta-data for an attribute within a StreamSchema.
    Operator
    Operator for processing and producing streams of tuples.
    Operator.TagNames
    Tag names for use with Operator#setTagData(String, Map.
    OperatorContext
    Context information for the Operator's execution context.
    OptionalContext
    An invocation of an operator may have optional contexts, that provide information specific to a particular environment, such as a consistent region.
    OutputTuple
    A mutable object that represents a tuple that can be submitted on an output port using the interface StreamingOutput.
    ProcessingElement
    Information about an Operator's processing element.
    StreamingData
    StreamingData describes an Operator's port.
    StreamingInput<T>
    StreamingInput represents an input port for an Operator.
    StreamingOutput<T>
    StreamingOutput represents an output port for an Operator.
    StreamSchema
    An immutable object representing the schema of a port or an attribute of type TUPLE.
    Tuple
    A representation of a stream's tuple.
    TupleAttribute<T,A>
    Defines an attribute for a specific port.
    Type
    Describes a specific type within a StreamSchema and its representation within Java.
  • Class Summary 
    Class Description
    AbstractOperator
    An abstract implementation of Operator that may be used by developers to implement their own Operator.
    PERuntime
    Utility methods to get information about the current processing element and operator context.
    Type.Factory
    Factory for creating SPL type related objects.
  • Enum Summary 
    Enum Description
    StreamingData.Punctuation
    Enumeration for punctuation marks.
    StreamingInput.ImportType
    Enumeration for how a port imports its streams.
    StreamingOutput.ExportType
    Enumeration for how a port exports its stream.
    Type.MetaType
    Enumeration of SPL types.
  • Exception Summary 
    Exception Description
    DataException
    This is an exception that is thrown by Java primitive operators when an error condition is found when processing input tuples.
  • Annotation Types Summary 
    Annotation Type Description
    OperatorContext.ContextCheck
    A method annotated @ContextCheck allows checking of an operator's invocation context.

Package com.ibm.streams.operator Description

Java Operator API for InfoSphere Streams. The main interface for an operator is Operator, an instance of operator acts as a processor of tuples. When an Operator has streaming inputs (ports) incoming tuples are passed into its process method as Tuple objects. An OperatorContext provides information about the context the operator is executing in and access to the method to submit tuples on its streaming outputs.

Java Operators are invoked from a IBM Streams Processing Language (SPL) application either using a Java primitive operator or the generic spl.utility.JavaOp operator from the SPL Standard toolkit.

Java Primitive Operators

A Java primitive operator defines the operator class and its required jar files in its operator model. In addition the operator model defines the syntax for the operator, such as expected parameters, ports and windowing semantics. A Java primitive operator is then is invoked like any other operator within SPL.

JavaOp

A JavaOp operator invocation supports these parameters:
  • generated Optional - A boolean parameter, that if set to true it indicates that the SPL compilation generates classes and interfaces specific to the operator and its ports.
  • className Required - The full class name of the operator that is used to process and submit tuples. The specified class must implement Operator.
  • classLibrary Required - Application specific class path elements required by the operator class, each value corresponds to a single JAR file or a directory containing Java classes.
  • vmArg Optional Command line arguments passed to the invoked Java virtual machine the operator is executed within. Operators that are fused into a single processing element must have equivalent values for vmArg. While Java system properties can be set using vmArg, the preference should be to set them within the operator's code, to avoid incompatible vmArg setting for fusing. Only when a system property is required to be set at JVM startup should it be set using vmArg.
In addition any number of arbitrary constant parameters can be defined that will be handled by the application's operator within the class defined by className.

For full details see the SPL Standard Toolkit reference.