This represents the statistics that CircuitBreaker instances use to track the success and failure rates of their protected programs, for use in determining when to trip ("open") the breaker and, when open, to maintain the periodic testing state for use in determining when the breaker can be closed and normal traffic let flow to the program.
This represents the statistics that CircuitBreaker instances use to track the inbound and processing rate of their protected programs, for use in determining when to throttle (fail fast) requests in order to maintain the effective inbound rate to an acceptable level such that the program (or system/service behind it) is not overloaded.
This data type provides the storage and access of a sliding time window of statistics, used to maintain aggregate program failures as well as observed inbound program request and processing rates.
An Algebraic Data Type (ADT) representing statistics associated with a CircuitBreaker
instance which can be rendered as a String
for use in monitoring applications.
The companion object to the FailureStatistics
instances, providing various data types and constructor
functions used by and for those instances.
The companion object to the FlowControlStatistics
instances, providing various data types and constructor
functions used by and for those instances.
The companion for SlidingVector
, consisting of data types used by its associated instances.
This data type provides the storage and access of a sliding time window of statistics, used to maintain aggregate program failures as well as observed inbound program request and processing rates.
- the SampleWindow for a
SlidingVector
indicates the time period (thescala.concurrent.duration.FiniteDuration
) for which this collection should maintain statistics. For instance, a sample window of "five minutes" would indicate that theentries
Vector
contains items with a time stamp no more than five minutes in the past.- a flag indicating whether or not at least one full pass equal to the time period has been collected in the underlying vector (used to determine whether there is enough data to derive statistics from it).
- the
scala.collection.immutable.Vector
ofSlidingVector.TimeStamped[A]
items (theTimeStamped
data type associates ajava.time.Instant
with a simple statistic itemA
, such asBoolean
orLong
, for example).