1 |
package dk.thoerup.traininfoservice; |
2 |
|
3 |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
4 |
import dk.thoerup.webconfig.ConfigVariable; |
5 |
|
6 |
|
7 |
public class TraininfoSettings implements BreakerConfig{ |
8 |
|
9 |
@ConfigVariable |
10 |
boolean useazuresite; |
11 |
|
12 |
@ConfigVariable(description = "Circuitbreaker") |
13 |
int banedk_threshold; |
14 |
|
15 |
@ConfigVariable |
16 |
int banedk_timeout; |
17 |
|
18 |
@ConfigVariable |
19 |
int cache_timeout; |
20 |
|
21 |
@ConfigVariable(readonly = true) |
22 |
int stats_interval; |
23 |
|
24 |
@ConfigVariable |
25 |
int reply_timeout; |
26 |
|
27 |
|
28 |
|
29 |
public boolean getUseAzureSite() { |
30 |
return useazuresite; |
31 |
} |
32 |
|
33 |
|
34 |
public int getCacheTimeout() { |
35 |
return cache_timeout; |
36 |
} |
37 |
|
38 |
public int getStatsInterval() { |
39 |
return stats_interval; |
40 |
} |
41 |
|
42 |
public int getReplyTimeout() { |
43 |
return reply_timeout; |
44 |
} |
45 |
|
46 |
|
47 |
@Override |
48 |
public int getTreshold() { |
49 |
return banedk_threshold; |
50 |
} |
51 |
|
52 |
@Override |
53 |
public int getTimeout() { |
54 |
return banedk_timeout; |
55 |
} |
56 |
} |