1   /*
2    * Logback: the reliable, generic, fast and flexible logging framework.
3    * Copyright (C) 1999-2026, QOS.ch. All rights reserved.
4    *
5    * This program and the accompanying materials are dual-licensed under
6    * either the terms of the Eclipse Public License v2.0 as published by
7    * the Eclipse Foundation
8    *
9    *   or (per the licensee's choosing)
10   *
11   * under the terms of the GNU Lesser General Public License version 2.1
12   * as published by the Free Software Foundation.
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  }