Interface ConcurrentModificationError

All Superinterfaces:
ErrorObject

public interface ConcurrentModificationError extends ErrorObject

The request conflicts with the current state of the involved resources. This error typically occurs when the request attempts to modify a resource that is out of date, that is, it has been modified by another client since the last time it was retrieved by the system attempting to update it. 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}")
             .currentVersion(1)
             .build()
 
  • Field Details

    • CONCURRENT_MODIFICATION

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

    • getSpecifiedVersion

      Long getSpecifiedVersion()

      The version specified in the failed request.

      Returns:
      specifiedVersion
    • getCurrentVersion

      @NotNull @NotNull Long getCurrentVersion()

      The current version of the resource.

      Returns:
      currentVersion
    • getConflictedResource

      Object getConflictedResource()

      The resource in conflict.

      Returns:
      conflictedResource
    • setSpecifiedVersion

      void setSpecifiedVersion(Long specifiedVersion)

      The version specified in the failed request.

      Parameters:
      specifiedVersion - value to be set
    • setCurrentVersion

      void setCurrentVersion(Long currentVersion)

      The current version of the resource.

      Parameters:
      currentVersion - value to be set
    • setConflictedResource

      void setConflictedResource(Object conflictedResource)

      The resource in conflict.

      Parameters:
      conflictedResource - 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