Skip to content

UTIL_CircuitBreaker.Metrics

Class

apex
global inherited sharing class UTIL_CircuitBreaker.Metrics

Public class containing circuit breaker metrics

Since: 1.0


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

Field Details

circuitId

apex
global String circuitId

Type: String

The circuit identifier

Since: 1.0

Example:

apex
String value = instance.circuitId;

consecutiveSuccesses

apex
global Integer consecutiveSuccesses

Type: Integer

Current consecutive success count

Since: 1.0

Example:

apex
Integer value = instance.consecutiveSuccesses;

failureCount

apex
global Integer failureCount

Type: Integer

Current failure count

Since: 1.0

Example:

apex
Integer value = instance.failureCount;

lastFailureTime

apex
global Datetime lastFailureTime

Type: Datetime

Time of last failure

Since: 1.0

Example:

apex
Datetime value = instance.lastFailureTime;

state

apex
global UTIL_CircuitBreaker.State state

Type: UTIL_CircuitBreaker.State

Current state of the circuit

Since: 1.0

Example:

apex
State value = instance.state;

stateChangedTime

apex
global Datetime stateChangedTime

Type: Datetime

Time when state last changed

Since: 1.0

Example:

apex
Datetime value = instance.stateChangedTime;