use of com.hazelcast.jet.impl.pipeline.transform.PeekTransform in project hazelcast by hazelcast.
the class ComputeStageImplBase method attachPeek.
@Nonnull
@SuppressWarnings({ "unchecked", "rawtypes" })
<RET> RET attachPeek(@Nonnull PredicateEx<? super T> shouldLogFn, @Nonnull FunctionEx<? super T, ? extends CharSequence> toStringFn) {
checkSerializable(shouldLogFn, "shouldLogFn");
checkSerializable(toStringFn, "toStringFn");
if (isRebalanceOutput) {
throw new JetException("peek() not supported after rebalance()");
}
return attach(new PeekTransform(transform, fnAdapter.adaptFilterFn(shouldLogFn), fnAdapter.adaptToStringFn(toStringFn)), fnAdapter);
}
Aggregations