X
- Tester typepublic abstract class AbstractTopology<X extends Tester> extends java.lang.Object implements Topology
Modifier | Constructor and Description |
---|---|
protected |
AbstractTopology(java.lang.String name) |
Modifier and Type | Method and Description |
---|---|
<T> TStream<T> |
collection(java.util.Collection<T> tuples)
Declare a stream of constants from a collection.
|
<T> TStream<T> |
generate(Supplier<T> data)
Declare an endless source stream.
|
java.lang.String |
getName()
Name of this topology.
|
X |
getTester()
Get the tester for this topology.
|
protected abstract X |
newTester() |
<T> TStream<T> |
of(T... values)
Declare a stream of objects.
|
TStream<java.lang.String> |
strings(java.lang.String... tuples)
Declare a stream of strings.
|
Topology |
topology()
Topology this element is contained in.
|
public Topology topology()
TopologyElement
topology
in interface TopologyElement
public java.lang.String getName()
Topology
getName
in interface Topology
TopologyProvider.newTopology(String)
public TStream<java.lang.String> strings(java.lang.String... tuples)
Topology
public <T> TStream<T> of(T... values)
Topology
public <T> TStream<T> generate(Supplier<T> data)
Topology
data.get()
will be called
repeatably. Each non-null returned value will be present on the stream.
If data
implements AutoCloseable
, its close()
method will be called when the topology's execution is terminated.
generate
in interface Topology
T
- Tuple typedata
- Supplier of the tuples.data.get()
.public X getTester()
Topology
protected abstract X newTester()
public <T> TStream<T> collection(java.util.Collection<T> tuples)
Topology
tuples
.collection
in interface Topology
T
- Tuple typetuples
- Tuples that will be present on the stream.tuples
.Copyright © 2016 The Apache Software Foundation. All Rights Reserved - bbe71fa-20161201-1641