org.qi4j.library.circuitbreaker

## Class CircuitBreaker

- java.lang.Object
- - org.qi4j.library.circuitbreaker.CircuitBreaker

-     public class CircuitBreaker
      extends Object

  Implementation of CircuitBreaker pattern

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CircuitBreaker.Status`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `CircuitBreaker()`
    `CircuitBreaker(int threshold, long timeout)`
    `CircuitBreaker(int threshold, long timeout, Specification<Throwable> allowedThrowables)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addPropertyChangeListener(PropertyChangeListener pcl)`
    `void` | `addVetoableChangeListener(VetoableChangeListener vcl)`
    `Date` | `enabledOn()`
    `boolean` | `isOn()`
    `Throwable` | `lastThrowable()`
    `void` | `removePropertyChangeListener(PropertyChangeListener pcl)`
    `void` | `removeVetoableChangeListener(VetoableChangeListener vcl)`
    `double` | `serviceLevel()`
    `CircuitBreaker.Status` | `status()`
    `void` | `success()`
    `int` | `threshold()`
    `void` | `throwable(Throwable throwable)`
    `void` | `trip()`
    `Date` | `trippedOn()`
    `void` | `turnOn()`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### CircuitBreaker

          public CircuitBreaker(int threshold,
                        long timeout,
                        Specification<Throwable> allowedThrowables)

    - #### CircuitBreaker

          public CircuitBreaker(int threshold,
                        long timeout)

    - #### CircuitBreaker

          public CircuitBreaker()

  - ### Method Detail

    - #### trip

          public void trip()

    - #### turnOn

          public void turnOn()
                      throws PropertyVetoException

      Throws:
        `PropertyVetoException`

    - #### threshold

          public int threshold()

    - #### lastThrowable

          public Throwable lastThrowable()

    - #### serviceLevel

          public double serviceLevel()

    - #### status

          public CircuitBreaker.Status status()

    - #### trippedOn

          public Date trippedOn()

    - #### enabledOn

          public Date enabledOn()

    - #### isOn

          public boolean isOn()

    - #### throwable

          public void throwable(Throwable throwable)

    - #### success

          public void success()

    - #### addVetoableChangeListener

          public void addVetoableChangeListener(VetoableChangeListener vcl)

    - #### removeVetoableChangeListener

          public void removeVetoableChangeListener(VetoableChangeListener vcl)

    - #### addPropertyChangeListener

          public void addPropertyChangeListener(PropertyChangeListener pcl)

    - #### removePropertyChangeListener

          public void removePropertyChangeListener(PropertyChangeListener pcl)