1
2
3
4
5
6
7
8
9
10
11
12
13
14
15 package ch.qos.logback.core.rolling;
16
17 class ConfigParameters {
18
19 long simulatedTime;
20 int maxHistory;
21 int simulatedNumberOfPeriods;
22 int startInactivity = -1;
23 int numInactivityPeriods;
24 String fileNamePattern;
25 long periodDurationInMillis = TimeBasedRollingWithArchiveRemoval_Test.MILLIS_IN_DAY;
26 long sizeCap;
27
28 ConfigParameters(long simulatedTime) {
29 this.simulatedTime = simulatedTime;
30 }
31
32 ConfigParameters maxHistory(int maxHistory) {
33 this.maxHistory = maxHistory;
34 return this;
35 }
36
37 ConfigParameters simulatedNumberOfPeriods(int simulatedNumberOfPeriods) {
38 this.simulatedNumberOfPeriods = simulatedNumberOfPeriods;
39 return this;
40 }
41
42 ConfigParameters startInactivity(int startInactivity) {
43 this.startInactivity = startInactivity;
44 return this;
45 }
46
47 ConfigParameters numInactivityPeriods(int numInactivityPeriods) {
48 this.numInactivityPeriods = numInactivityPeriods;
49 return this;
50 }
51
52 ConfigParameters fileNamePattern(String fileNamePattern) {
53 this.fileNamePattern = fileNamePattern;
54 return this;
55 }
56
57 ConfigParameters periodDurationInMillis(long periodDurationInMillis) {
58 this.periodDurationInMillis = periodDurationInMillis;
59 return this;
60 }
61
62 ConfigParameters sizeCap(long sizeCap) {
63 this.sizeCap = sizeCap;
64 return this;
65 }
66 }