Search in sources :

Example 1 with BiPredicateEx

use of com.hazelcast.function.BiPredicateEx in project hazelcast by hazelcast.

the class ComputeStageImplBase method attachFilterUsingPartitionedService.

@Nonnull
@SuppressWarnings({ "unchecked", "rawtypes" })
<S, K, RET> RET attachFilterUsingPartitionedService(@Nonnull ServiceFactory<?, S> serviceFactory, @Nonnull FunctionEx<? super T, ? extends K> partitionKeyFn, @Nonnull BiPredicateEx<? super S, ? super T> filterFn) {
    checkSerializable(filterFn, "filterFn");
    checkSerializable(partitionKeyFn, "partitionKeyFn");
    serviceFactory = moveAttachedFilesToPipeline(serviceFactory);
    BiPredicateEx adaptedFilterFn = fnAdapter.adaptFilterUsingServiceFn(filterFn);
    FunctionEx adaptedPartitionKeyFn = fnAdapter.adaptKeyFn(partitionKeyFn);
    return (RET) attach(filterUsingServicePartitionedTransform(transform, serviceFactory, adaptedFilterFn, adaptedPartitionKeyFn), fnAdapter);
}
Also used : BiPredicateEx(com.hazelcast.function.BiPredicateEx) BiFunctionEx(com.hazelcast.function.BiFunctionEx) FunctionEx(com.hazelcast.function.FunctionEx) ToLongFunctionEx(com.hazelcast.function.ToLongFunctionEx) Nonnull(javax.annotation.Nonnull)

Example 2 with BiPredicateEx

use of com.hazelcast.function.BiPredicateEx in project hazelcast by hazelcast.

the class ComputeStageImplBase method attachFilterUsingService.

@Nonnull
@SuppressWarnings({ "unchecked", "rawtypes" })
<S, RET> RET attachFilterUsingService(@Nonnull ServiceFactory<?, S> serviceFactory, @Nonnull BiPredicateEx<? super S, ? super T> filterFn) {
    checkSerializable(filterFn, "filterFn");
    serviceFactory = moveAttachedFilesToPipeline(serviceFactory);
    BiPredicateEx adaptedFilterFn = fnAdapter.adaptFilterUsingServiceFn(filterFn);
    return attach(filterUsingServiceTransform(transform, serviceFactory, adaptedFilterFn), fnAdapter);
}
Also used : BiPredicateEx(com.hazelcast.function.BiPredicateEx) Nonnull(javax.annotation.Nonnull)

Aggregations

BiPredicateEx (com.hazelcast.function.BiPredicateEx)2 Nonnull (javax.annotation.Nonnull)2 BiFunctionEx (com.hazelcast.function.BiFunctionEx)1 FunctionEx (com.hazelcast.function.FunctionEx)1 ToLongFunctionEx (com.hazelcast.function.ToLongFunctionEx)1