use of com.ibm.streamsx.topology.internal.core.TSinkImpl in project streamsx.topology by IBMStreams.
the class JavaPrimitive method invokeJavaPrimitiveSink.
/**
* Invocation of a Java primitive operator that consumes a Stream.
*
* @param opClass
* Class of the operator to be invoked
* @param input
* Stream that will be connected to the only input port of the
* operator
* @param params
* Parameters for the SPL Java Primitive operator, ignored if {@code null}.
*/
public static TSink invokeJavaPrimitiveSink(Class<? extends Operator> opClass, SPLInput input, Map<String, ? extends Object> params) {
BOperatorInvocation sink = input.builder().addOperator(getInvocationName(opClass), opClass, params);
SourceInfo.setSourceInfo(sink, JavaPrimitive.class);
SPL.connectInputToOperator(input, sink);
return new TSinkImpl(input.topology(), sink);
}
use of com.ibm.streamsx.topology.internal.core.TSinkImpl in project streamsx.topology by IBMStreams.
the class SPL method invokeSink.
/**
* Invocation an SPL operator that consumes a Stream.
*
* @param name
* Name of the operator
* @param kind
* SPL kind of the operator to be invoked.
* @param input
* Stream that will be connected to the only input port of the
* operator
* @param params
* Parameters for the SPL operator, ignored if it is null.
* @return the sink element
*/
public static TSink invokeSink(String name, String kind, SPLInput input, Map<String, ? extends Object> params) {
BOperatorInvocation op = input.builder().addSPLOperator(name, kind, params);
SourceInfo.setSourceInfo(op, SPL.class);
SPL.connectInputToOperator(input, op);
return new TSinkImpl(input.topology(), op);
}
Aggregations