Skip to content

UTIL_CircuitBreaker.Metrics

Class

apex
global inherited sharing class UTIL_CircuitBreaker.Metrics

Public class containing circuit breaker metrics


Fields

FieldDescription
global String circuitIdThe circuit identifier
global Integer consecutiveSuccessesCurrent consecutive success count
global Integer failureCountCurrent failure count
global Datetime lastFailureTimeTime of last failure
global UTIL_CircuitBreaker.State stateCurrent state of the circuit
global Datetime stateChangedTimeTime when state last changed

circuitId

apex
global String circuitId

Type: String

The circuit identifier

Example

apex
String value = instance.circuitId;

consecutiveSuccesses

apex
global Integer consecutiveSuccesses

Type: Integer

Current consecutive success count

Example

apex
Integer value = instance.consecutiveSuccesses;

failureCount

apex
global Integer failureCount

Type: Integer

Current failure count

Example

apex
Integer value = instance.failureCount;

lastFailureTime

apex
global Datetime lastFailureTime

Type: Datetime

Time of last failure

Example

apex
Datetime value = instance.lastFailureTime;

state

apex
global UTIL_CircuitBreaker.State state

Type: UTIL_CircuitBreaker.State

Current state of the circuit

Example

apex
State value = instance.state;

stateChangedTime

apex
global Datetime stateChangedTime

Type: Datetime

Time when state last changed

Example

apex
Datetime value = instance.stateChangedTime;