com.ccadllc.cedi.circuitbreaker.statistics
- the SampleWindow for a SlidingVector
indicates the time
period (the scala.concurrent.duration.FiniteDuration
) for which this
collection should maintain statistics. For instance, a sample window of "five
minutes" would indicate that the entries
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
of SlidingVector.TimeStamped[A]
items (the TimeStamped
data type associates a java.time.Instant
with a simple statistic
item A
, such as Boolean
or Long
, for example).
Adds a value to the vector with an associated timestamp.
Adds a value to the vector with an associated timestamp. The sliding window of the vector is re-evaluated to remove oldest items no longer in the time window.
- the java.time.Instant
timestamp associated with the value.
- the unconstrained value A
to be associated with the timestamp.
newSlidingVector - a new copy of the sliding vector.
- the scala.collection.immutable.Vector
of SlidingVector.TimeStamped[A]
items (the TimeStamped
data type associates a java.time.Instant
with a simple statistic
item A
, such as Boolean
or Long
, for example).
- 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).
Alternate manner in which to protect the effectful program F[A]
.
Alternate manner in which to protect the effectful program F[A]
.
See CircuitBreaker#protect for details.
- the CircuitBreaker instance which will protect this F[A]
.
enhancedProgram - the protected effectful program.
Resets the vector of items to zero, returning a new copy.
Resets the vector of items to zero, returning a new copy.
newSlidingVector - a new copy of the vector.
- the SampleWindow for a SlidingVector
indicates the time
period (the scala.concurrent.duration.FiniteDuration
) for which this
collection should maintain statistics.
- the SampleWindow for a SlidingVector
indicates the time
period (the scala.concurrent.duration.FiniteDuration
) for which this
collection should maintain statistics. For instance, a sample window of "five
minutes" would indicate that the entries
Vector
contains items with a
time stamp no more than five minutes in the past.
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).