Interface KeyFilter<R>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface
public interface KeyFilter<R>
Functional interface to retrieve the Bucket4j key. The key is used to identify the Bucket4j storage.
-
Method Details
-
key
Return the unique Bucket4j storage key. You can think of the key as a unique identifier which is for example an IP-Address or a user name. The rate limit is then applied to each individual key.- Parameters:
request- HTTP request information of the current request- Returns:
- the key to identify the the rate limit (IP, username, ...)
-