Packages

final class Builders[F[_]] extends AnyVal with CircuitBreakerDocs

Builders specified for CircuitBreaker, using the Partially-Applied Type technique.

Source
CircuitBreaker.scala
Linear Supertypes
CircuitBreakerDocs, AnyVal, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Builders
  2. CircuitBreakerDocs
  3. AnyVal
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Builders(F: Sync[F])

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    Any
  2. final def ##(): Int
    Definition Classes
    Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    Any
  4. val F: Sync[F]
  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def getClass(): Class[_ <: AnyVal]
    Definition Classes
    AnyVal → Any
  7. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  8. def of(maxFailures: Int, resetTimeout: FiniteDuration, exponentialBackoffFactor: Double = 1.0, maxResetTimeout: Duration = Duration.Inf, onRejected: F[Unit] = F.unit, onClosed: F[Unit] = F.unit, onHalfOpen: F[Unit] = F.unit, onOpen: F[Unit] = F.unit, padding: PaddingStrategy = NoPadding)(implicit clock: Clock[F]): F[CircuitBreaker[F]]

    Safe builder for a CircuitBreaker reference.

    Safe builder for a CircuitBreaker reference.

    maxFailures

    is the maximum count for failures before opening the circuit breaker

    resetTimeout

    is the timeout to wait in the Open state before attempting a close of the circuit breaker (but without the backoff factor applied)

    exponentialBackoffFactor

    is a factor to use for resetting the resetTimeout when in the HalfOpen state, in case the attempt to Close fails

    maxResetTimeout

    is the maximum timeout the circuit breaker is allowed to use when applying the exponentialBackoffFactor

    onRejected

    is a callback for signaling rejected tasks, so every time a task execution is attempted and rejected in Open or HalfOpen states

    onClosed

    is a callback for signaling transitions to the Closed state

    onHalfOpen

    is a callback for signaling transitions to HalfOpen

    onOpen

    is a callback for signaling transitions to Open

    padding

    is the PaddingStrategy to apply to the underlying atomic reference used, to use in case contention and "false sharing" become a problem

  9. def toString(): String
    Definition Classes
    Any
  10. def unsafe(maxFailures: Int, resetTimeout: FiniteDuration, exponentialBackoffFactor: Double = 1.0, maxResetTimeout: Duration = Duration.Inf, onRejected: F[Unit] = F.unit, onClosed: F[Unit] = F.unit, onHalfOpen: F[Unit] = F.unit, onOpen: F[Unit] = F.unit, padding: PaddingStrategy = NoPadding)(implicit clock: Clock[F]): CircuitBreaker[F]

    Unsafe builder, an alternative to CircuitBreaker[F].of for people knowing what they are doing.

    Unsafe builder, an alternative to CircuitBreaker[F].of for people knowing what they are doing.

    UNSAFE WARNING: this builder is unsafe to use because creating a circuit breaker allocates shared mutable states, which violates referential transparency. Prefer to use the safe CircuitBreaker[F].of and pass that CircuitBreaker around as a plain parameter.

    maxFailures

    is the maximum count for failures before opening the circuit breaker

    resetTimeout

    is the timeout to wait in the Open state before attempting a close of the circuit breaker (but without the backoff factor applied)

    exponentialBackoffFactor

    is a factor to use for resetting the resetTimeout when in the HalfOpen state, in case the attempt to Close fails

    maxResetTimeout

    is the maximum timeout the circuit breaker is allowed to use when applying the exponentialBackoffFactor

    onRejected

    is a callback for signaling rejected tasks, so every time a task execution is attempted and rejected in Open or HalfOpen states

    onClosed

    is a callback for signaling transitions to the Closed state

    onHalfOpen

    is a callback for signaling transitions to HalfOpen

    onOpen

    is a callback for signaling transitions to Open

    padding

    is the PaddingStrategy to apply to the underlying atomic reference used, to use in case contention and "false sharing" become a problem

    Annotations
    @UnsafeBecauseImpure()

Inherited from CircuitBreakerDocs

Inherited from AnyVal

Inherited from Any

Ungrouped