Search in sources :

Example 1 with AsyncTransformUsingServiceBatchedP

use of com.hazelcast.jet.impl.processor.AsyncTransformUsingServiceBatchedP in project hazelcast by hazelcast.

the class UpdateProcessorSupplier method get.

@Nonnull
@Override
public Collection<? extends Processor> get(int count) {
    List<Processor> processors = new ArrayList<>(count);
    for (int i = 0; i < count; i++) {
        String mapName = this.mapName;
        Processor processor = new AsyncTransformUsingServiceBatchedP<>(ServiceFactories.nonSharedService(SecuredFunctions.iMapFn(mapName)), null, MAX_CONCURRENT_OPS, MAX_BATCH_SIZE, (IMap<Object, Object> map, List<JetSqlRow> rows) -> update(rows, map));
        processors.add(processor);
    }
    return processors;
}
Also used : IMap(com.hazelcast.map.IMap) Processor(com.hazelcast.jet.core.Processor) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) Collections.singletonList(java.util.Collections.singletonList) List(java.util.List) AsyncTransformUsingServiceBatchedP(com.hazelcast.jet.impl.processor.AsyncTransformUsingServiceBatchedP) Nonnull(javax.annotation.Nonnull)

Aggregations

Processor (com.hazelcast.jet.core.Processor)1 AsyncTransformUsingServiceBatchedP (com.hazelcast.jet.impl.processor.AsyncTransformUsingServiceBatchedP)1 IMap (com.hazelcast.map.IMap)1 ArrayList (java.util.ArrayList)1 Collections.singletonList (java.util.Collections.singletonList)1 List (java.util.List)1 Nonnull (javax.annotation.Nonnull)1