3 |
import java.util.Date; |
import java.util.Date; |
4 |
import java.util.LinkedList; |
import java.util.LinkedList; |
5 |
|
|
6 |
|
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
7 |
import dk.thoerup.circuitbreaker.notification.Notifier; |
import dk.thoerup.circuitbreaker.notification.Notifier; |
8 |
|
|
9 |
public class LoggingCircuitBreaker extends AccountingCircuitBreaker { |
public class LoggingCircuitBreaker extends AccountingCircuitBreaker { |
15 |
public class LogEntry { |
public class LogEntry { |
16 |
public long time; |
public long time; |
17 |
public Notifier.Event event; |
public Notifier.Event event; |
18 |
public int count = 0; |
public int count = 1; |
19 |
|
|
20 |
public LogEntry(Notifier.Event evnt) { |
public LogEntry(Notifier.Event evnt) { |
21 |
this.event = evnt; |
this.event = evnt; |
42 |
|
|
43 |
|
|
44 |
|
|
45 |
public LoggingCircuitBreaker(String name, int threshold, long timeoutMS) { |
public LoggingCircuitBreaker(String name, BreakerConfig config) { |
46 |
super(name, threshold, timeoutMS); |
super(name, config); |
47 |
|
|
48 |
} |
} |
49 |
|
|