Interface OverCapacityError
- All Superinterfaces:
ErrorObject
Returned when the service is having trouble handling the load.
The client application should retry the request with exponential backoff up to a point where further delay is unacceptable.
Example to create an instance using the builder pattern
OverCapacityError overCapacityError = OverCapacityError.builder()
.message("{message}")
.build()
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic OverCapacityErrorBuilder
builder()
builder factory method for OverCapacityErrorstatic OverCapacityErrorBuilder
builder
(OverCapacityError template) create builder for OverCapacityError instancestatic OverCapacityError
deepCopy
(OverCapacityError template) factory method to create a deep copy of OverCapacityError@NotNull String
getCode()
Error identifier.@NotNull String
Plain text description of the error.static OverCapacityError
of()
factory methodstatic OverCapacityError
of
(OverCapacityError template) factory method to create a shallow copy OverCapacityErrorvoid
setMessage
(String message) Plain text description of the error.static com.fasterxml.jackson.core.type.TypeReference<OverCapacityError>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
withOverCapacityError
(Function<OverCapacityError, T> helper) accessor map functionMethods inherited from interface com.commercetools.api.models.error.ErrorObject
setValue, values, withErrorObject
-
Field Details
-
OVER_CAPACITY
discriminator value for OverCapacityError- See Also:
-
-
Method Details
-
getCode
Description copied from interface:ErrorObject
Error identifier.
- Specified by:
getCode
in interfaceErrorObject
- Returns:
- code
-
getMessage
Plain text description of the error.
- Specified by:
getMessage
in interfaceErrorObject
- Returns:
- message
-
setMessage
Plain text description of the error.
- Specified by:
setMessage
in interfaceErrorObject
- Parameters:
message
- value to be set
-
of
factory method- Returns:
- instance of OverCapacityError
-
of
factory method to create a shallow copy OverCapacityError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
deepCopy
factory method to create a deep copy of OverCapacityError- Parameters:
template
- instance to be copied- Returns:
- copy instance
-
builder
builder factory method for OverCapacityError- Returns:
- builder
-
builder
create builder for OverCapacityError instance- Parameters:
template
- instance with prefilled values for the builder- Returns:
- builder
-
withOverCapacityError
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-