com.ibm.streams.flow.declare
Interface InputPortDeclaration
-
- All Superinterfaces:
- PortDeclaration<InputPortDeclaration>, StreamingData
public interface InputPortDeclaration extends PortDeclaration<InputPortDeclaration>
Declaration of an input port for anOperatorInvocation
. An input port is created asnot windowed
.- Since:
- InfoSphere® Streams Version 3.1
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface and Description static class
InputPortDeclaration.CongestionPolicy
-
Nested classes/interfaces inherited from interface com.ibm.streams.operator.StreamingData
StreamingData.Punctuation
-
-
Method Summary
Methods Modifier and Type Method and Description InputPortDeclaration
connect(OutputPortDeclaration... outputPorts)
Connect this input port to output ports.InputPortDeclaration
evictCount(int count)
Set the type of the window eviction policy to beStreamWindow.Policy.COUNT
.InputPortDeclaration
evictDelta(java.lang.String attribute, java.lang.Object delta)
Set the type of the window eviction policy to beStreamWindow.Policy.DELTA
.InputPortDeclaration
evictPunctuation()
Set the type of the window eviction policy to beStreamWindow.Policy.PUNCTUATION
.InputPortDeclaration
evictTime(double seconds)
Set the type of the window eviction policy to beStreamWindow.Policy.TIME
.InputPortDeclaration
evictTime(long value, java.util.concurrent.TimeUnit unit)
Set the type of the window eviction policy to beStreamWindow.Policy.TIME
.InputPortSet
getPortSet()
Return the port set for this port if the operator class had anInputPortSet
annotation.InputPortDeclaration
partitioned()
Set the window for this input port to be partitioned.InputPortDeclaration
partitionEvictionAge(double seconds)
Set the window partition eviction policy to be age based.InputPortDeclaration
partitionEvictionAge(long value, java.util.concurrent.TimeUnit unit)
Set the window partition eviction policy to be age based.InputPortDeclaration
partitionEvictionCount(int count)
Set the window partition eviction policy to partition count based.InputPortDeclaration
partitionEvictionTupleCount(int count)
Set the window partition eviction policy to tuple count based.InputPortDeclaration
sliding()
Set this input port to be a sliding window.InputPortDeclaration
threaded(InputPortDeclaration.CongestionPolicy congestionPolicy, int queueSize, boolean singleThreadedOnInput)
Set this input port to be a threaded port.InputPortDeclaration
triggerCount(int count)
Set the type of the window trigger policy to beStreamWindow.Policy.COUNT
.InputPortDeclaration
triggerDelta(java.lang.String attribute, java.lang.Object delta)
Set the type of the window trigger policy to beStreamWindow.Policy.DELTA
.InputPortDeclaration
triggerTime(double seconds)
Set the type of the window trigger policy to beStreamWindow.Policy.TIME
.InputPortDeclaration
triggerTime(long value, java.util.concurrent.TimeUnit unit)
Set the type of the window trigger policy to beStreamWindow.Policy.TIME
.InputPortDeclaration
tumbling()
Set this input port to be a tumbling window.-
Methods inherited from interface com.ibm.streams.flow.declare.PortDeclaration
getConnections, isConnected, operator
-
Methods inherited from interface com.ibm.streams.operator.StreamingData
getName, getPEPortNumber, getPortNumber, getStreamSchema, isConnectedToPEPort
-
-
-
-
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
-
partitioned
InputPortDeclaration partitioned()
Set the window for this input port to be partitioned.- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.Type.NOT_WINDOWED
-
evictCount
InputPortDeclaration evictCount(int count)
Set the type of the window eviction policy to beStreamWindow.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 isStreamWindow.Type.NOT_WINDOWED
java.lang.IllegalArgumentException
-count
is less than zero
-
evictTime
InputPortDeclaration evictTime(double seconds)
Set the type of the window eviction policy to beStreamWindow.Policy.TIME
.- Parameters:
seconds
- Eviction time period in seconds- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.Type.NOT_WINDOWED
-
evictTime
InputPortDeclaration evictTime(long value, java.util.concurrent.TimeUnit unit)
Set the type of the window eviction policy to beStreamWindow.Policy.TIME
.- Parameters:
value
- Eviction time period.unit
- Time unit forvalue
.- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.Type.NOT_WINDOWED
-
evictPunctuation
InputPortDeclaration evictPunctuation()
Set the type of the window eviction policy to beStreamWindow.Policy.PUNCTUATION
.- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port is notStreamWindow.Type.TUMBLING
-
evictDelta
InputPortDeclaration evictDelta(java.lang.String attribute, java.lang.Object delta)
Set the type of the window eviction policy to beStreamWindow.Policy.DELTA
.
If the type of the attribute isType.MetaType.TIMESTAMP
then the type ofdelta
must beDouble
. Otherwise the object type ofvalue
must match theobject type
of the attribute.- Parameters:
attribute
- Attribute name for the delta eviction policydelta
- Delta value for the eviction policy- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.Type.NOT_WINDOWED
-
triggerCount
InputPortDeclaration triggerCount(int count)
Set the type of the window trigger policy to beStreamWindow.Policy.COUNT
.- Parameters:
count
- Number of tuples- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port is notStreamWindow.Type.SLIDING
-
triggerTime
InputPortDeclaration triggerTime(double seconds)
Set the type of the window trigger policy to beStreamWindow.Policy.TIME
.- Parameters:
seconds
- Trigger time period in seconds- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port is notStreamWindow.Type.SLIDING
-
triggerTime
InputPortDeclaration triggerTime(long value, java.util.concurrent.TimeUnit unit)
Set the type of the window trigger policy to beStreamWindow.Policy.TIME
.- Parameters:
value
- Trigger time periodunit
- Time unit forvalue
- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port is notStreamWindow.Type.SLIDING
-
triggerDelta
InputPortDeclaration triggerDelta(java.lang.String attribute, java.lang.Object delta)
Set the type of the window trigger policy to beStreamWindow.Policy.DELTA
.
If the type of the attribute isType.MetaType.TIMESTAMP
then type ofdelta
must beDouble
, otherwise the object type ofvalue
must match theobject type
of the attribute.- Parameters:
attribute
- Attribute name for the delta trigger policydelta
- Delta value for the trigger policy- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port is notStreamWindow.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 isStreamWindow.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 timeunit
- Time unit forvalue
- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.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 exceedscount
, partitions are deleted until the partition count is equal tocount
.- Parameters:
count
- Number of partitions- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.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 ofcount
, partitions are deleted until the tuple count is less than or equal to the value ofcount
.- Parameters:
count
- Number of tuples- Returns:
- this
- Throws:
java.lang.IllegalStateException
- The window type of this input port isStreamWindow.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 anInputPortSet
annotation.- Returns:
- Port set for this port, or null if the operator class was not annotated.
- Since:
- InfoSphere® Streams Version 3.2
-
threaded
InputPortDeclaration threaded(InputPortDeclaration.CongestionPolicy congestionPolicy, int queueSize, boolean singleThreadedOnInput)
Set this input port to be a threaded port.- Parameters:
congestionPolicy
-queueSize
-- Returns:
- this
- Since:
- Streams Version 4.1
-
-