Class VersionMismatchException

All Implemented Interfaces:
Serializable

public class VersionMismatchException extends DomainException
Exception thrown when an optimistic locking conflict is detected.

Raised when the version of a persisted aggregate does not match the version held by the caller, indicating that another party has modified the resource since it was last read.

See Also:
  • Constructor Details

    • VersionMismatchException

      public VersionMismatchException(String message)
      Constructs a VersionMismatchException with the given detail message.
      Parameters:
      message - the detail message describing the version conflict
    • VersionMismatchException

      public VersionMismatchException(String message, Throwable cause)
      Constructs a VersionMismatchException with the given detail message and cause.
      Parameters:
      message - the detail message describing the version conflict
      cause - the underlying cause