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