ContextT
- Some limiters take a context to perform more fine grained limits.@FunctionalInterface
public interface Limiter<ContextT>
Modifier and Type | Interface and Description |
---|---|
static interface |
Limiter.Listener |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Limiter.Listener> |
acquire(ContextT context)
Acquire a token from the limiter.
|
java.util.Optional<Limiter.Listener> acquire(ContextT context)
context
- Context for the request