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

Last change on this file since 5901 was 5901, checked in by emanuel.dima@uni-tuebingen.de, 9 years ago
  1. alpha10: throttled client bug fix, more todos
File size: 1.7 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 SCAN_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT;
45
46                @JsonProperty
47                @Range
48                int SEARCH_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT;
49
50                @JsonProperty
51                @Range
52                int ENDPOINTS_SCAN_TIMEOUT_MS;
53
54                @JsonProperty
55                @Range
56                int ENDPOINTS_SEARCH_TIMEOUT_MS;
57
58                @JsonProperty
59                @Range
60                long EXECUTOR_SHUTDOWN_TIMEOUT_MS;
61
62                @JsonIgnore
63                public TimeUnit getScanTaskTimeUnit() {
64                        return TimeUnit.valueOf(SCAN_TASK_TIME_UNIT);
65                }
66
67                @JsonIgnore
68                public int getENDPOINTS_SCAN_TIMEOUT_MS() {
69                        return ENDPOINTS_SCAN_TIMEOUT_MS;
70                }
71
72                @JsonIgnore
73                public int getENDPOINTS_SEARCH_TIMEOUT_MS() {
74                        return ENDPOINTS_SEARCH_TIMEOUT_MS;
75                }
76
77                @JsonIgnore
78                public int getSCAN_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT() {
79                        return SCAN_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT;
80                }
81
82                @JsonIgnore
83                public int getSEARCH_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT() {
84                        return SEARCH_MAX_CONCURRENT_REQUESTS_PER_ENDPOINT;
85                }
86        }
87        public Params aggregatorParams = new Params();
88}
Note: See TracBrowser for help on using the repository browser.