Record Class CircuitOpen
java.lang.Object
java.lang.Record
com.cockroachlabs.crdb.anomaly.CircuitOpen
- Record Components:
openedFailures- the consecutive failure count that tripped the breaker
- All Implemented Interfaces:
CrdbAnomaly
Signals that a circuit breaker is OPEN and the call was rejected without being
attempted.
-
Constructor Summary
ConstructorsConstructorDescriptionCircuitOpen(int openedFailures) Creates an instance of aCircuitOpenrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.message()A human-readable description of the anomaly.intReturns the value of theopenedFailuresrecord component.sqlState()The SQLSTATE associated with this anomaly, ornullif not applicable.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CircuitOpen
public CircuitOpen(int openedFailures) Creates an instance of aCircuitOpenrecord class.- Parameters:
openedFailures- the value for theopenedFailuresrecord component
-
-
Method Details
-
sqlState
Description copied from interface:CrdbAnomalyThe SQLSTATE associated with this anomaly, ornullif not applicable.- Specified by:
sqlStatein interfaceCrdbAnomaly
-
message
Description copied from interface:CrdbAnomalyA human-readable description of the anomaly.- Specified by:
messagein interfaceCrdbAnomaly
-
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 with thecomparemethod from their corresponding wrapper classes. -
openedFailures
public int openedFailures()Returns the value of theopenedFailuresrecord component.- Returns:
- the value of the
openedFailuresrecord component
-