Package com.atlassian.bamboo.utils
Class InvocationLimiterResponse<T>
- java.lang.Object
-
- com.atlassian.bamboo.utils.InvocationLimiterResponse<T>
-
- Type Parameters:
T- type of response
@Immutable public class InvocationLimiterResponse<T> extends Object
Invocation limiter response. Contains information whether an invocation occurred or not.In case of reaching the maximum number of invocations, the response contains information when the next call can be performed.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @Nullable DurationgetRetryAfter()TgetValue()booleanisCalled()static <U> InvocationLimiterResponse<U>rejected(@NotNull Duration retryAfter)static <U> InvocationLimiterResponse<U>successful(U value)
-
-
-
Method Detail
-
successful
public static <U> InvocationLimiterResponse<U> successful(@NotNull U value)
-
rejected
public static <U> InvocationLimiterResponse<U> rejected(@NotNull @NotNull Duration retryAfter)
-
getValue
@Nullable public T getValue()
-
isCalled
public boolean isCalled()
-
getRetryAfter
@Nullable public @Nullable Duration getRetryAfter()
-
-