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 |
---|---|
Duration |
getRetryAfter() |
T |
getValue() |
boolean |
isCalled() |
static <U> InvocationLimiterResponse<U> |
rejected(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 Duration retryAfter)
@Nullable public T getValue()
public boolean isCalled()
@Nullable public Duration getRetryAfter()
Copyright © 2021 Atlassian Software Systems Pty Ltd. All rights reserved.