Class RateLimiterOperator<T>
java.lang.Object
io.github.resilience4j.rxjava3.ratelimiter.operator.RateLimiterOperator<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
io.reactivex.rxjava3.core.CompletableTransformer,io.reactivex.rxjava3.core.FlowableTransformer<T,,T> io.reactivex.rxjava3.core.MaybeTransformer<T,,T> io.reactivex.rxjava3.core.ObservableTransformer<T,,T> io.reactivex.rxjava3.core.SingleTransformer<T,T>
public class RateLimiterOperator<T>
extends Object
implements io.reactivex.rxjava3.core.FlowableTransformer<T,T>, io.reactivex.rxjava3.core.SingleTransformer<T,T>, io.reactivex.rxjava3.core.MaybeTransformer<T,T>, io.reactivex.rxjava3.core.CompletableTransformer, io.reactivex.rxjava3.core.ObservableTransformer<T,T>
A RateLimiter operator which checks if a downstream subscriber/observer can acquire a permission
to subscribe to an upstream Publisher. Otherwise emits a
RequestNotPermitted if the rate
limit is exceeded.-
Method Summary
Modifier and TypeMethodDescriptionio.reactivex.rxjava3.core.CompletableSourceapply(io.reactivex.rxjava3.core.Completable upstream) org.reactivestreams.Publisher<T>io.reactivex.rxjava3.core.MaybeSource<T>io.reactivex.rxjava3.core.ObservableSource<T>io.reactivex.rxjava3.core.SingleSource<T>static <T> RateLimiterOperator<T>of(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) Creates a RateLimiterOperator.
-
Method Details
-
of
public static <T> RateLimiterOperator<T> of(io.github.resilience4j.ratelimiter.RateLimiter rateLimiter) Creates a RateLimiterOperator.- Parameters:
rateLimiter- the RateLimiter- Returns:
- a RateLimiterOperator
-
apply
-
apply
-
apply
public io.reactivex.rxjava3.core.CompletableSource apply(io.reactivex.rxjava3.core.Completable upstream) - Specified by:
applyin interfaceio.reactivex.rxjava3.core.CompletableTransformer
-
apply
-
apply
-