All Downloads are FREE. Search and download functionalities are using the official Maven repository.

io.github.sinri.keel.servant.intravenous.KeelIntravenous Maven / Gradle / Ivy

Go to download

A website framework with VERT.X for ex-PHP-ers, exactly Ark Framework Users.

The newest version!
package io.github.sinri.keel.servant.intravenous;

import io.vertx.core.Future;

import java.util.List;
import java.util.function.Function;

/**
 * @param  The type of drop
 * @since 3.0.1 became a sugar
 */
public class KeelIntravenous extends KeelIntravenousBase {
    private final Function, Future> processor;


    public KeelIntravenous(Function, Future> processor) {
        super();
        this.processor = processor;
    }

    public KeelIntravenous setBatchSize(int batchSize) {
        if (batchSize < 1) batchSize = 1;
        this.batchSize = batchSize;
        return this;
    }

    public KeelIntravenous setSleepTime(long sleepTime) {
        if (sleepTime < 1) sleepTime = 1;
        this.sleepTime = sleepTime;
        return this;
    }

    @Override
    protected Future process(List list) {
        return processor.apply(list);
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy