Search in sources :

Example 6 with BInputPort

use of com.ibm.streamsx.topology.builder.BInputPort in project streamsx.topology by IBMStreams.

the class StreamImpl method _modify.

private TStream<T> _modify(UnaryOperator<T> transformer, Type tupleType) {
    String opName = transformer.getClass().getSimpleName();
    if (opName.isEmpty()) {
        opName = getTupleName() + "Modify";
    }
    BOperatorInvocation bop = JavaFunctional.addFunctionalOperator(this, opName, FunctionTransform.class, transformer);
    SourceInfo.setSourceInfo(bop, StreamImpl.class);
    BInputPort inputPort = connectTo(bop, true, null);
    // By default add a queue
    inputPort.addQueue(true);
    return this.addMatchingOutput(bop, tupleType);
}
Also used : BInputPort(com.ibm.streamsx.topology.builder.BInputPort) BOperatorInvocation(com.ibm.streamsx.topology.builder.BOperatorInvocation)

Aggregations

BInputPort (com.ibm.streamsx.topology.builder.BInputPort)6 BOperatorInvocation (com.ibm.streamsx.topology.builder.BOperatorInvocation)6 JSONArray (com.ibm.json.java.JSONArray)1 StreamSchema (com.ibm.streams.operator.StreamSchema)1 BOutput (com.ibm.streamsx.topology.builder.BOutput)1 BOutputPort (com.ibm.streamsx.topology.builder.BOutputPort)1 KeyFunctionHasher (com.ibm.streamsx.topology.internal.logic.KeyFunctionHasher)1