Class/Object

com.ccadllc.cedi.circuitbreaker.statistics

SlidingVector

Related Docs: object SlidingVector | package statistics

Permalink

case class SlidingVector[A](window: SampleWindow, fullWindowCollected: Boolean = false, entries: Vector[TimeStamped[A]] = Vector.empty) extends Product with Serializable

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.

window

- 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.

fullWindowCollected

- 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).

entries

- 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).

Source
SlidingVector.scala
Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SlidingVector
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
Implicitly
  1. by CircuitBreakerOps
  2. by any2stringadd
  3. by StringFormat
  4. by Ensuring
  5. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SlidingVector(window: SampleWindow, fullWindowCollected: Boolean = false, entries: Vector[TimeStamped[A]] = Vector.empty)

    Permalink

    window

    - 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.

    fullWindowCollected

    - 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).

    entries

    - 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).

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to any2stringadd[SlidingVector[A]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (SlidingVector[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to ArrowAssoc[SlidingVector[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. def add(timestamp: Instant, value: A): SlidingVector[A]

    Permalink

    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.

    timestamp

    - the java.time.Instant timestamp associated with the value.

    value

    - the unconstrained value A to be associated with the timestamp.

    returns

    newSlidingVector - a new copy of the sliding vector.

  7. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  8. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def ensuring(cond: (SlidingVector[A]) ⇒ Boolean, msg: ⇒ Any): SlidingVector[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to Ensuring[SlidingVector[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  10. def ensuring(cond: (SlidingVector[A]) ⇒ Boolean): SlidingVector[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to Ensuring[SlidingVector[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  11. def ensuring(cond: Boolean, msg: ⇒ Any): SlidingVector[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to Ensuring[SlidingVector[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  12. def ensuring(cond: Boolean): SlidingVector[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to Ensuring[SlidingVector[A]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  13. val entries: Vector[TimeStamped[A]]

    Permalink

    - 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).

  14. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to StringFormat[SlidingVector[A]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  17. val fullWindowCollected: Boolean

    Permalink

    - 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).

  18. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  21. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  22. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. def protect(cb: CircuitBreaker[SlidingVector]): SlidingVector[A]

    Permalink

    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.

    cb

    - the CircuitBreaker instance which will protect this F[A].

    returns

    enhancedProgram - the protected effectful program.

    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to CircuitBreakerOps[SlidingVector, A] performed by method CircuitBreakerOps in com.ccadllc.cedi.circuitbreaker.
    Definition Classes
    CircuitBreakerOps
  24. def reset: SlidingVector[A]

    Permalink

    Resets the vector of items to zero, returning a new copy.

    Resets the vector of items to zero, returning a new copy.

    returns

    newSlidingVector - a new copy of the vector.

  25. val self: SlidingVector[A]

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to CircuitBreakerOps[SlidingVector, A] performed by method CircuitBreakerOps in com.ccadllc.cedi.circuitbreaker.
    Definition Classes
    CircuitBreakerOps
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  27. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. val window: SampleWindow

    Permalink

    - 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.

  31. def [B](y: B): (SlidingVector[A], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from SlidingVector[A] to ArrowAssoc[SlidingVector[A]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion CircuitBreakerOps from SlidingVector[A] to CircuitBreakerOps[SlidingVector, A]

Inherited by implicit conversion any2stringadd from SlidingVector[A] to any2stringadd[SlidingVector[A]]

Inherited by implicit conversion StringFormat from SlidingVector[A] to StringFormat[SlidingVector[A]]

Inherited by implicit conversion Ensuring from SlidingVector[A] to Ensuring[SlidingVector[A]]

Inherited by implicit conversion ArrowAssoc from SlidingVector[A] to ArrowAssoc[SlidingVector[A]]

Ungrouped