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

io.muserver.RateLimiter Maven / Gradle / Ivy

The newest version!
package io.muserver;

import java.util.Map;

/**
 * A rate limiter. A limiter is created when {@link MuServerBuilder#withRateLimiter(RateLimitSelector)} is used.
 */
public interface RateLimiter {

    /**
     * @return A map of the current bucket names to the number of requests in each bucket
     */
    Map currentBuckets();

    /**
     * @return The selector that was passed to {@link MuServerBuilder#withRateLimiter(RateLimitSelector)}
     */
    RateLimitSelector selector();
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy