com.ibm.streams.operator

Interface Operator

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface and Description
      static interface  Operator.TagNames
      Tag names for use with Operator#setTagData(String, Map.
    • Method Detail

      • initialize

        void initialize(OperatorContext context)
                        throws java.lang.Exception
        Initialize this operator. Called once before any tuples are processed.
        Parameters:
        context - OperatorContext for this operator.
        Throws:
        java.lang.Exception - Operator failure, will cause the enclosing PE to terminate.
      • allPortsReady

        void allPortsReady()
                           throws java.lang.Exception
        Called once initialization is complete and all input and output ports are connected and ready to process and submit tuples. Operators that submit tuples independently of incoming tuples, e.g. source type operators, must wait for this method to be called before submitting any tuples.
        Since this is a notification that all input and output ports are ready, it is possible that process and processPunctuation may be called before allPortsReady, due to thread scheduling.

        Implementations must not block and must return control to the caller.

        This operator's OperatorContextMXBean will also issue a notification when all ports are ready.
        Code may register actions to be invoked at all ports ready using the utility method addAllPortsReadyAction or by adding notification listeners to this operator's OperatorContextMXBean.

        Throws:
        java.lang.Exception - Operator failure, will cause the enclosing PE to terminate.
        See Also:
        OperatorContextMXBean, OperatorLifeCycle.addAllPortsReadyAction(OperatorContext, javax.management.NotificationListener)
      • process

        void process(StreamingInput<Tuple> port,
                   Tuple tuple)
                     throws java.lang.Exception
        Process an incoming tuple that arrived on the specified port.
        Parameters:
        port - Port the tuple is arriving on.
        tuple - Object representing the incoming tuple.
        Throws:
        java.lang.Exception - Operator failure, will cause the enclosing PE to terminate.
      • processPunctuation

        void processPunctuation(StreamingInput<Tuple> port,
                              StreamingData.Punctuation mark)
                                throws java.lang.Exception
        Process an incoming punctuation mark on the specified port.
        Parameters:
        port - Port punctuation mark arrived on
        mark - value of mark
        Throws:
        java.lang.Exception - Operator failure, will cause the enclosing PE to terminate.
      • setTagData

        void setTagData(java.lang.String tagName,
                      java.util.Map<java.lang.String,java.lang.String> tagValue)
        Set tag data for the operator. If this value is Operator.TagNames.OperatorIGC, the tags will be registered in the IG catalog. Other tag names may be defined in future releases.
        Since:
        InfoSphere® Streams Version 4.1