Search in sources :

Example 26 with BOperatorInvocation

use of com.ibm.streamsx.topology.builder.BOperatorInvocation 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

BOperatorInvocation (com.ibm.streamsx.topology.builder.BOperatorInvocation)26 BInputPort (com.ibm.streamsx.topology.builder.BInputPort)6 BOutputPort (com.ibm.streamsx.topology.builder.BOutputPort)4 ArrayList (java.util.ArrayList)4 JSONObject (com.ibm.json.java.JSONObject)3 StreamSchema (com.ibm.streams.operator.StreamSchema)3 HashMap (java.util.HashMap)3 JSONArray (com.ibm.json.java.JSONArray)2 TStream (com.ibm.streamsx.topology.TStream)2 TSinkImpl (com.ibm.streamsx.topology.internal.core.TSinkImpl)2 Constants (com.ibm.streamsx.topology.internal.logic.Constants)2 Type (java.lang.reflect.Type)2 BOperator (com.ibm.streamsx.topology.builder.BOperator)1 BOutput (com.ibm.streamsx.topology.builder.BOutput)1 Predicate (com.ibm.streamsx.topology.function.Predicate)1 KeyFunctionHasher (com.ibm.streamsx.topology.internal.logic.KeyFunctionHasher)1 Print (com.ibm.streamsx.topology.internal.logic.Print)1 SPLStream (com.ibm.streamsx.topology.spl.SPLStream)1 Path (java.nio.file.Path)1 Map (java.util.Map)1