Record Class SerializationConflict
java.lang.Object
java.lang.Record
com.cockroachlabs.crdb.anomaly.SerializationConflict
- All Implemented Interfaces:
CrdbAnomaly
public record SerializationConflict(String sqlState, String message, Throwable cause)
extends Record
implements CrdbAnomaly
A serialization conflict (SQLSTATE
40001, or the deadlock variant
40P01). Retryable: the transaction can be replayed.-
Constructor Summary
ConstructorsConstructorDescriptionSerializationConflict(String sqlState, String message, Throwable cause) Creates an instance of aSerializationConflictrecord class. -
Method Summary
Modifier and TypeMethodDescriptioncause()Returns the value of thecauserecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()Returns the value of themessagerecord component.sqlState()Returns the value of thesqlStaterecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SerializationConflict
Creates an instance of aSerializationConflictrecord class.- Parameters:
sqlState- the value for thesqlStaterecord componentmessage- the value for themessagerecord componentcause- the value for thecauserecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
sqlState
Returns the value of thesqlStaterecord component.- Specified by:
sqlStatein interfaceCrdbAnomaly- Returns:
- the value of the
sqlStaterecord component
-
message
Returns the value of themessagerecord component.- Specified by:
messagein interfaceCrdbAnomaly- Returns:
- the value of the
messagerecord component
-
cause
Returns the value of thecauserecord component.- Returns:
- the value of the
causerecord component
-