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