1 |
package dk.thoerup.traininfoservice; |
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; |
import dk.thoerup.circuitbreaker.config.BreakerConfig; |
8 |
import dk.thoerup.webconfig.ConfigVariable; |
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{ |
public class TraininfoSettings implements BreakerConfig{ |
14 |
|
|
15 |
|
Logger logger = Logger.getLogger(TraininfoSettings.class.getName() ); |
16 |
|
|
17 |
@ConfigVariable |
@ConfigVariable |
18 |
boolean useazuresite; |
boolean useazuresite; |
19 |
|
|
20 |
@ConfigVariable(description = "Circuitbreaker") |
@ConfigVariable(description = "Circuitbreaker", readonly = true) |
21 |
int banedk_threshold; |
int banedk_threshold; |
22 |
|
|
23 |
@ConfigVariable |
@ConfigVariable(readonly = true) |
24 |
int banedk_timeout; |
int banedk_timeout; |
25 |
|
|
26 |
@ConfigVariable |
@ConfigVariable(readonly = true) |
27 |
int cache_timeout; |
int cache_timeout; |
28 |
|
|
29 |
@ConfigVariable(readonly = true) |
@ConfigVariable(readonly = true) |
32 |
@ConfigVariable |
@ConfigVariable |
33 |
int reply_timeout; |
int reply_timeout; |
34 |
|
|
|
|
|
35 |
|
|
36 |
public boolean getUseAzureSite() { |
public boolean getUseAzureSite() { |
37 |
return useazuresite; |
return useazuresite; |
49 |
public int getReplyTimeout() { |
public int getReplyTimeout() { |
50 |
return reply_timeout; |
return reply_timeout; |
51 |
} |
} |
|
|
|
52 |
|
|
53 |
@Override |
@Override |
54 |
public int getTreshold() { |
public int getTreshold() { |