Class RateLimit<V>
java.lang.Object
io.smallrye.faulttolerance.core.rate.limit.RateLimit<V>
- All Implemented Interfaces:
FaultToleranceStrategy<V>
-
Constructor Summary
ConstructorsConstructorDescriptionRateLimit(FaultToleranceStrategy<V> delegate, String description, int maxInvocations, long timeWindowInMillis, long minSpacingInMillis, RateLimitType type, Stopwatch stopwatch) -
Method Summary
-
Constructor Details
-
RateLimit
public RateLimit(FaultToleranceStrategy<V> delegate, String description, int maxInvocations, long timeWindowInMillis, long minSpacingInMillis, RateLimitType type, Stopwatch stopwatch)
-
-
Method Details
-
apply
Description copied from interface:FaultToleranceStrategyApply the fault tolerance strategy around the targetCallable. TheCallableis wrapped in anFaultToleranceContext.- Specified by:
applyin interfaceFaultToleranceStrategy<V>- Parameters:
ctx- theInvocationContextwrapping theCallableguarded by this fault tolerance strategy- Returns:
- result computed by the target
Callable
-