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

net.yudichev.jiotty.common.lang.throttling.ThresholdGatedConsumer Maven / Gradle / Ivy

package net.yudichev.jiotty.common.lang.throttling;

import javax.annotation.concurrent.NotThreadSafe;
import java.util.function.Consumer;

@NotThreadSafe
interface ThresholdGatedConsumer extends Consumer {
    void reset();

    static  ThresholdGatedConsumer thresholdGated(int threshold, Consumer delegate) {
        return new ThresholdGatedConsumerImpl<>(threshold, delegate);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy