com.ibm.streams.flow.declare

Interface InputPortDeclaration

    • Method Detail

      • connect

        InputPortDeclaration connect(OutputPortDeclaration... outputPorts)
        Connect this input port to output ports.
        Parameters:
        outputPorts - Output ports to connect to.
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - At least one of the output ports has a different schema.
      • sliding

        InputPortDeclaration sliding()
        Set this input port to be a sliding window. The existing window definitions are cleared, and the eviction and trigger policies must be defined before the graph can be executed.
        Returns:
        this
      • tumbling

        InputPortDeclaration tumbling()
        Set this input port to be a tumbling window. The existing window definitions are cleared, and an eviction policy must be defined before the graph can be executed.
        Returns:
        this
      • evictCount

        InputPortDeclaration evictCount(int count)
        Set the type of the window eviction policy to be StreamWindow.Policy.COUNT.
        Parameters:
        count - Set the number of tuples for the eviction policy.
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
        java.lang.IllegalArgumentException - count is less than zero
      • evictDelta

        InputPortDeclaration evictDelta(java.lang.String attribute,
                                      java.lang.Object delta)
        Set the type of the window eviction policy to be StreamWindow.Policy.DELTA.
        If the type of the attribute is Type.MetaType.TIMESTAMP then the type of delta must be Double. Otherwise the object type of value must match the object type of the attribute.
        Parameters:
        attribute - Attribute name for the delta eviction policy
        delta - Delta value for the eviction policy
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
      • triggerTime

        InputPortDeclaration triggerTime(long value,
                                       java.util.concurrent.TimeUnit unit)
        Set the type of the window trigger policy to be StreamWindow.Policy.TIME.
        Parameters:
        value - Trigger time period
        unit - Time unit for value
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is not StreamWindow.Type.SLIDING
      • triggerDelta

        InputPortDeclaration triggerDelta(java.lang.String attribute,
                                        java.lang.Object delta)
        Set the type of the window trigger policy to be StreamWindow.Policy.DELTA.
        If the type of the attribute is Type.MetaType.TIMESTAMP then type of delta must be Double, otherwise the object type of value must match the object type of the attribute.
        Parameters:
        attribute - Attribute name for the delta trigger policy
        delta - Delta value for the trigger policy
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is not StreamWindow.Type.SLIDING
      • partitionEvictionAge

        InputPortDeclaration partitionEvictionAge(double seconds)
        Set the window partition eviction policy to be age based. If a tuple is not inserted into a partition for the given age-out period, the partition is deleted.
        Parameters:
        seconds - Partition age-out time in seconds
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
        java.lang.IllegalStateException - The window is not partitioned.
        java.lang.IllegalArgumentException - seconds is less than zero
      • partitionEvictionAge

        InputPortDeclaration partitionEvictionAge(long value,
                                                java.util.concurrent.TimeUnit unit)
        Set the window partition eviction policy to be age based. If a tuple is not inserted into a partition for the given age-out period, the partition is deleted.
        Parameters:
        value - Partition age-out time
        unit - Time unit for value
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
        java.lang.IllegalStateException - The window is not partitioned.
        @IllegalArgumentException - value is less than or equal to zero
      • partitionEvictionCount

        InputPortDeclaration partitionEvictionCount(int count)
        Set the window partition eviction policy to partition count based. If the number of partitions exceeds count, partitions are deleted until the partition count is equal to count.
        Parameters:
        count - Number of partitions
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
        java.lang.IllegalStateException - The window is not partitioned.
        java.lang.IllegalArgumentException - count is less than or equal to zero
      • partitionEvictionTupleCount

        InputPortDeclaration partitionEvictionTupleCount(int count)
        Set the window partition eviction policy to tuple count based. If the total number of tuples across all the partitions exceeds the value of count, partitions are deleted until the tuple count is less than or equal to the value of count.
        Parameters:
        count - Number of tuples
        Returns:
        this
        Throws:
        java.lang.IllegalStateException - The window type of this input port is StreamWindow.Type.NOT_WINDOWED
        java.lang.IllegalStateException - The window is not partitioned.
        java.lang.IllegalArgumentException - count is less than or equal to zero
      • getPortSet

        InputPortSet getPortSet()
        Return the port set for this port if the operator class had an InputPortSet annotation.
        Returns:
        Port set for this port, or null if the operator class was not annotated.
        Since:
        InfoSphere® Streams Version 3.2