T- Type of the data item produced by the output port
public interface Connector<T>
Connectorrepresents an output port of a
Connectorsupports two methods to add processing for tuples submitted to the port:
connect(Vertex, int): Connect this to an input port of another
Vertex. Any number of connections can be made. Any tuple submitted by the output port will appear on all connections made through this method. For any tuple
tordering of appearance across the connected input ports is not guaranteed.
peek(Peek): Insert a peek after the output port and before any connections made by
connect(Vertex, int). Multiple peeks can be inserted. A tuple
tsubmitted by the output port will be seen by all peek oplets. The ordering of the peek is guaranteed such that the peeks are processed in the order they were added to this
tbeing seen first by the first peek added.
P1,P2,P3added in that order and connections
C1,C2added, the graph will be logically:
-->C1 port-->P1-->P2-->P3--| -->C2
tsubmitted by the port will be peeked at by
P3peeked at the tuple,
C2will process the tuple in an arbitrary order.
|Modifier and Type||Method and Description|
Set the alias for the connector.
Returns the alias for the connector if any.
Returns the set of tags associated with this connector.
Was connect() called on this connector?
Adds the specified tags to the connector.
Connectorto the specified target's input. This method may be called multiple times to fan out to multiple input ports. Each tuple submitted to this output port will be processed by all connections.
Vertexto connect to
inputPort- the index of the target's input port to connect to.
Peekoplet between an output port and its connections. This method may be called multiple times to insert multiple peeks. Each tuple submitted to this output port will be seen by all peeks in order of their insertion, starting with the first peek inserted.
N- Peek oplet type
oplet- Oplet to insert.
void tag(java.lang.String... values)
values- Tag values.
void alias(java.lang.String alias)
The alias must be unique within the topology. The alias may be used in various contexts:
alias- the alias
java.lang.IllegalStateException- if the an alias has already been set
Copyright © 2017 The Apache Software Foundation. All Rights Reserved - 4744f56-20170226-1707