org.qi4j.library.circuitbreaker
Class CircuitBreaker
java.lang.Object
org.qi4j.library.circuitbreaker.CircuitBreaker
public class CircuitBreaker
- extends java.lang.Object
Implementation of CircuitBreaker pattern
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CircuitBreaker
public CircuitBreaker(int threshold,
long timeout,
Specification<java.lang.Throwable> allowedThrowables)
CircuitBreaker
public CircuitBreaker(int threshold,
long timeout)
CircuitBreaker
public CircuitBreaker()
trip
public void trip()
turnOn
public void turnOn()
throws java.beans.PropertyVetoException
- Throws:
java.beans.PropertyVetoException
threshold
public int threshold()
lastThrowable
public java.lang.Throwable lastThrowable()
serviceLevel
public double serviceLevel()
status
public CircuitBreaker.Status status()
trippedOn
public java.util.Date trippedOn()
enabledOn
public java.util.Date enabledOn()
isOn
public boolean isOn()
throwable
public void throwable(java.lang.Throwable throwable)
success
public void success()
addVetoableChangeListener
public void addVetoableChangeListener(java.beans.VetoableChangeListener vcl)
removeVetoableChangeListener
public void removeVetoableChangeListener(java.beans.VetoableChangeListener vcl)
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener pcl)