org.qi4j.library.circuitbreaker
Class CircuitBreaker
java.lang.Object
org.qi4j.library.circuitbreaker.CircuitBreaker
public class CircuitBreaker
- extends 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<Throwable> allowedThrowables)
CircuitBreaker
public CircuitBreaker(int threshold,
long timeout)
CircuitBreaker
public CircuitBreaker()
trip
public void trip()
turnOn
public void turnOn()
throws PropertyVetoException
- Throws:
PropertyVetoException
getThreshold
public int getThreshold()
getLastThrowable
public Throwable getLastThrowable()
getServiceLevel
public double getServiceLevel()
getStatus
public CircuitBreaker.Status getStatus()
getTrippedOn
public Date getTrippedOn()
getEnableOn
public Date getEnableOn()
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)