Package com.github.gpluscb.ggjava.api
Class RateLimiter.SimpleBuilder
- java.lang.Object
-
- com.github.gpluscb.ggjava.api.RateLimiter.SimpleBuilder
-
- Enclosing interface:
- RateLimiter
public static class RateLimiter.SimpleBuilder extends java.lang.ObjectUsed for building instances of RateLimiter that respect a minimal spacing between tasks.- See Also:
RateLimiter.simpleBuilder()
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RateLimiterbuild()Builds the RateLimiter instance.RateLimiter.SimpleBuilderlimit(java.lang.Long limit)Sets the minimal spacing between execution of tasks in ms.
-
-
-
Method Detail
-
limit
@Nonnull public RateLimiter.SimpleBuilder limit(@Nonnegative @Nullable java.lang.Long limit)
Sets the minimal spacing between execution of tasks in ms.- Parameters:
limit- the minimal spacing between execution of tasks in ms or null- Returns:
- itself for chaining
-
build
@Nonnull public RateLimiter build()
Builds the RateLimiter instance.- Returns:
- the RateLimiter instance
-
-