source: SRUAggregator/trunk/src/main/java/eu/clarin/sru/fcs/aggregator/app/AggregatorConfiguration.java @ 5900

Last change on this file since 5900 was 5900, checked in by emanuel.dima@uni-tuebingen.de, 9 years ago
  1. alpha 9: corpus view UI improvements, bug fixes
File size: 1.3 KB
Line 
1package eu.clarin.sru.fcs.aggregator.app;
2
3import com.fasterxml.jackson.annotation.JsonIgnore;
4import com.fasterxml.jackson.annotation.JsonProperty;
5import io.dropwizard.Configuration;
6import java.util.concurrent.TimeUnit;
7import org.hibernate.validator.constraints.NotEmpty;
8import org.hibernate.validator.constraints.Range;
9
10public class AggregatorConfiguration extends Configuration {
11
12        public static class Params {
13
14                @NotEmpty
15                @JsonProperty
16                String CENTER_REGISTRY_URL;
17
18                @NotEmpty
19                @JsonProperty
20                String WEBLICHT_URL;
21
22                @NotEmpty
23                @JsonProperty
24                String AGGREGATOR_FILE_PATH;
25
26                @JsonProperty
27                @Range
28                int SCAN_MAX_DEPTH;
29
30                @JsonProperty
31                @Range
32                long SCAN_TASK_INITIAL_DELAY;
33
34                @Range
35                @JsonProperty
36                int SCAN_TASK_INTERVAL;
37
38                @NotEmpty
39                @JsonProperty
40                String SCAN_TASK_TIME_UNIT;
41
42                @JsonProperty
43                @Range
44                int ENDPOINTS_SCAN_TIMEOUT_MS;
45
46                @JsonProperty
47                @Range
48                int ENDPOINTS_SEARCH_TIMEOUT_MS;
49
50                @JsonProperty
51                @Range
52                long EXECUTOR_SHUTDOWN_TIMEOUT_MS;
53
54                @JsonIgnore
55                public TimeUnit getScanTaskTimeUnit() {
56                        return TimeUnit.valueOf(SCAN_TASK_TIME_UNIT);
57                }
58
59                @JsonIgnore
60                public int getENDPOINTS_SCAN_TIMEOUT_MS() {
61                        return ENDPOINTS_SCAN_TIMEOUT_MS;
62                }
63
64                @JsonIgnore
65                public int getENDPOINTS_SEARCH_TIMEOUT_MS() {
66                        return ENDPOINTS_SEARCH_TIMEOUT_MS;
67                }
68        }
69
70        public Params aggregatorParams = new Params();
71}
Note: See TracBrowser for help on using the repository browser.