io.quarkiverse.operatorsdk.it.CustomRateLimiter Maven / Gradle / Ivy
package io.quarkiverse.operatorsdk.it;
import java.time.Duration;
import java.util.Optional;
import io.javaoperatorsdk.operator.api.config.AnnotationConfigurable;
import io.javaoperatorsdk.operator.processing.event.rate.RateLimiter;
@SuppressWarnings("rawtypes")
public class CustomRateLimiter implements RateLimiter, AnnotationConfigurable {
private int value;
@Override
public Optional isLimited(RateLimitState rateLimitState) {
return Optional.empty();
}
@Override
public RateLimitState initState() {
return null;
}
@Override
public void initFrom(CustomRateConfiguration customRateConfiguration) {
this.value = customRateConfiguration.value();
}
@SuppressWarnings("unused")
// make it visible for JSON serialization
public int getValue() {
return value;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy