Interface | Description |
---|---|
TopologyElement |
Any element in a
Topology . |
TSink |
A handle to the
sink of a TStream . |
TStream<T> |
A
TStream is a declaration of a continuous sequence of tuples. |
TWindow<T,K> |
Declares a window of tuples for a
TStream . |
Class | Description |
---|---|
Topology |
A declaration of a topology of streaming data.
|
Enum | Description |
---|---|
TStream.Routing |
Enumeration for routing tuples to parallel channels.
|
Topology
is created
that then is used to build a topology (or graph) of
streams, represented by TStream
instances. This topology is the declaration of the application,
and it may then be :
.sab
file).TStream
represents a continuous stream of tuples
with a specific type T
. Streams are transformed into
new streams through functional transformations, defined using
a single method of an interface like Function
.
A transformation consists of an instance of a functional interface,
known as the functional logic
and how that logic is applied against tuples on the stream.
The method on TStream
the functional logic is
passed into to create a new stream, declares how the functional logic
is applied, for example:
TStream.filter(com.ibm.streamsx.topology.function.Predicate)
declares that the functional logic will be
called for each tuple on the stream, and if it returns true
then the
input tuple is submitted to the new stream, otherwise the input tuple is discarded.
TStream.transform(com.ibm.streamsx.topology.function.Function)
declares that the functional logic will be
called for each tuple and its return value will be submitted to the output stream, unless
it is null
, in which case no tuple will be submitted.
Predicate
.
These objects are always serialized and deserialized before being
executed against tuples on streams, regardless of the type of the StreamsContext
.
final
and thus
can be captured by the anonymous class.
readObject()
or readResolve()
. The sample RegexGrep
has an example of this.
parallel channel
, when the stream is not parallelized
a single instance is called.
Predicate
may maintain a collection of
previously seen tuples on the stream to filter out duplicates.
transient
, such as connections to external systems.final
.
s.transform(trans1).filter(filt).transform(trans2)
t
returned from trans1.apply(t)
may be passed directly as filt.test(t)
and to trans2.apply(t)
if
the former returned true
.
TStream
types should be immutable, which means any downstream
functional logic cannot modify any tuple through its reference. Thus a
reference to a tuple may be safely passed to multiple downstream functional logic
instances.
$STREAMS_INSTALL/lib/com.ibm.streams.operator.jar
$STREAMS_INSTALL/lib/com.ibm.streams.operator.samples.jar
$STREAMS_INSTALL/ext/lib/commons-math-2.1.jar
$STREAMS_INSTALL/ext/lib/log4j-1.2.17.jar
$STREAMS_INSTALL/ext/lib/JSON4J.jar