RtVersionConflictException
Namespace: Meshmakers.Octo.Runtime.Contracts
Thrown when a write that carries an expected RtEntity.RtVersion (optimistic concurrency) finds the stored entity at a different version: another writer changed the entity after the caller read it. Nothing was written for the conflicting entity. The caller re-reads the entity, re-applies its change and writes again (typically with one retry).
public class RtVersionConflictException : PersistenceException, ISerializable
Inheritance Object → Exception → PersistenceException → RtVersionConflictException
Implements ISerializable
Remarks:
Distinct from "entity not found" (a missing entity keeps its existing not-found error) and from the silent skip of AttributeNewerThanGuard. In a transactional session the whole transaction is rolled back when the exception leaves the session scope.
Properties
RtEntityId
The entity the write was refused for.
public RtEntityId RtEntityId { get; }
Property Value
RtEntityId
ExpectedRtVersion
The version the caller expected the stored entity to have.
public ulong ExpectedRtVersion { get; }
Property Value
TargetSite
public MethodBase TargetSite { get; }
Property Value
Message
public string Message { get; }
Property Value
Data
public IDictionary Data { get; }
Property Value
InnerException
public Exception InnerException { get; }
Property Value
HelpLink
public string HelpLink { get; set; }
Property Value
Source
public string Source { get; set; }
Property Value
HResult
public int HResult { get; set; }
Property Value
StackTrace
public string StackTrace { get; }
Property Value
Constructors
RtVersionConflictException(RtEntityId, UInt64)
Creates a new instance of RtVersionConflictException.
public RtVersionConflictException(RtEntityId rtEntityId, ulong expectedRtVersion)
Parameters
rtEntityId RtEntityId
The entity the write was refused for
expectedRtVersion UInt64
The version the caller expected