UTIL_CircuitBreaker.Metrics
Class
apex
global inherited sharing class UTIL_CircuitBreaker.MetricsPublic class containing circuit breaker metrics
Fields
| Field | Description |
|---|---|
| global String circuitId | The circuit identifier |
| global Integer consecutiveSuccesses | Current consecutive success count |
| global Integer failureCount | Current failure count |
| global Datetime lastFailureTime | Time of last failure |
| global UTIL_CircuitBreaker.State state | Current state of the circuit |
| global Datetime stateChangedTime | Time when state last changed |
circuitId
apex
global String circuitIdType: String
The circuit identifier
Example
apex
String value = instance.circuitId;consecutiveSuccesses
apex
global Integer consecutiveSuccessesType: Integer
Current consecutive success count
Example
apex
Integer value = instance.consecutiveSuccesses;failureCount
apex
global Integer failureCountType: Integer
Current failure count
Example
apex
Integer value = instance.failureCount;lastFailureTime
apex
global Datetime lastFailureTimeType: Datetime
Time of last failure
Example
apex
Datetime value = instance.lastFailureTime;state
apex
global UTIL_CircuitBreaker.State stateType: UTIL_CircuitBreaker.State
Current state of the circuit
Example
apex
State value = instance.state;stateChangedTime
apex
global Datetime stateChangedTimeType: Datetime
Time when state last changed
Example
apex
Datetime value = instance.stateChangedTime;