T
- type of response@Immutable public class InvocationLimiterResponse<T> extends Object
In case of reaching the maximum number of invocations, the response contains information when the next call can be performed.
Modifier and Type | Method and Description |
---|---|
@Nullable Duration |
getRetryAfter() |
T |
getValue() |
boolean |
isCalled() |
static <U> InvocationLimiterResponse<U> |
rejected(@NotNull Duration retryAfter) |
static <U> InvocationLimiterResponse<U> |
successful(U value) |
public static <U> InvocationLimiterResponse<U> successful(@NotNull U value)
public static <U> InvocationLimiterResponse<U> rejected(@NotNull @NotNull Duration retryAfter)
@Nullable public T getValue()
public boolean isCalled()
@Nullable public @Nullable Duration getRetryAfter()
Copyright © 2022 Atlassian Software Systems Pty Ltd. All rights reserved.