Interface ConcurrentModificationError

All Superinterfaces:
ErrorObject

public interface ConcurrentModificationError extends ErrorObject

Returned when the request conflicts with the current state of the involved resources. Typically, the request attempts to modify a resource that is out of date (that is modified by another client since it was last retrieved). The client application should resolve the conflict (with or without involving the end-user) before retrying the request.


Example to create an instance using the builder pattern

     ConcurrentModificationError concurrentModificationError = ConcurrentModificationError.builder()
             .message("{message}")
             .build()
 
  • Field Details

    • CONCURRENT_MODIFICATION

      static final String CONCURRENT_MODIFICATION
      discriminator value for ConcurrentModificationError
      See Also:
  • Method Details

    • getCode

      @NotNull @NotNull String getCode()
      Description copied from interface: ErrorObject

      Error identifier.

      Specified by:
      getCode in interface ErrorObject
      Returns:
      code
    • getMessage

      @NotNull @NotNull String getMessage()

      "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

      Specified by:
      getMessage in interface ErrorObject
      Returns:
      message
    • getCurrentVersion

      Long getCurrentVersion()

      Current version of the resource.

      Returns:
      currentVersion
    • setMessage

      void setMessage(String message)

      "Object $resourceId has a different version than expected. Expected: $expectedVersion - Actual: $currentVersion."

      Specified by:
      setMessage in interface ErrorObject
      Parameters:
      message - value to be set
    • setCurrentVersion

      void setCurrentVersion(Long currentVersion)

      Current version of the resource.

      Parameters:
      currentVersion - value to be set
    • of

      factory method
      Returns:
      instance of ConcurrentModificationError
    • of

      factory method to create a shallow copy ConcurrentModificationError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of ConcurrentModificationError
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for ConcurrentModificationError
      Returns:
      builder
    • builder

      create builder for ConcurrentModificationError instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withConcurrentModificationError

      default <T> T withConcurrentModificationError(Function<ConcurrentModificationError,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<ConcurrentModificationError> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference