blob: 7c66977910670ee74f8682e99127a791507795a8 [file] [log] [blame]
<!DOCTYPE HTML>
<html lang="en">
<head>
<!-- Generated by javadoc (17) -->
<title>DefaultRolloverStrategy (Apache Log4j Core 2.23.1 API)</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="description" content="declaration: package: org.apache.logging.log4j.core.appender.rolling, class: DefaultRolloverStrategy">
<meta name="generator" content="javadoc/ClassWriterImpl">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../script-dir/jquery-ui.min.css" title="Style">
<link rel="stylesheet" type="text/css" href="../../../../../../../jquery-ui.overrides.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
<script type="text/javascript" src="../../../../../../../script-dir/jquery-3.6.1.min.js"></script>
<script type="text/javascript" src="../../../../../../../script-dir/jquery-ui.min.js"></script>
</head>
<body class="class-declaration-page">
<script type="text/javascript">var evenRowColor = "even-row-color";
var oddRowColor = "odd-row-color";
var tableTab = "table-tab";
var activeTableTab = "active-table-tab";
var pathtoroot = "../../../../../../../";
loadScripts(document, 'script');</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<div class="flex-box">
<header role="banner" class="flex-header">
<nav role="navigation">
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="top-nav" id="navbar-top">
<div class="skip-nav"><a href="#skip-navbar-top" title="Skip navigation links">Skip navigation links</a></div>
<ul id="navbar-top-firstrow" class="nav-list" title="Navigation">
<li><a href="../../../../../../../index.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="nav-bar-cell1-rev">Class</li>
<li><a href="class-use/DefaultRolloverStrategy.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html#class">Help</a></li>
</ul>
</div>
<div class="sub-nav">
<div>
<ul class="sub-nav-list">
<li>Summary:&nbsp;</li>
<li><a href="#nested-class-summary">Nested</a>&nbsp;|&nbsp;</li>
<li><a href="#field-summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor-summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor-detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method-detail">Method</a></li>
</ul>
</div>
<div class="nav-list-search"><label for="search-input">SEARCH:</label>
<input type="text" id="search-input" value="search" disabled="disabled">
<input type="reset" id="reset-button" value="reset" disabled="disabled">
</div>
</div>
<!-- ========= END OF TOP NAVBAR ========= -->
<span class="skip-nav" id="skip-navbar-top"></span></nav>
</header>
<div class="flex-content">
<main role="main">
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">org.apache.logging.log4j.core.appender.rolling</a></div>
<h1 title="Class DefaultRolloverStrategy" class="title">Class DefaultRolloverStrategy</h1>
</div>
<div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">java.lang.Object</a>
<div class="inheritance"><a href="AbstractRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy</a>
<div class="inheritance">org.apache.logging.log4j.core.appender.rolling.DefaultRolloverStrategy</div>
</div>
</div>
<section class="class-description" id="class-description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="RolloverStrategy.html" title="interface in org.apache.logging.log4j.core.appender.rolling">RolloverStrategy</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="annotations"><a href="../../config/plugins/Plugin.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@Plugin</a>(<a href="../../config/plugins/Plugin.html#name()">name</a>="DefaultRolloverStrategy",
<a href="../../config/plugins/Plugin.html#category()">category</a>="Core",
<a href="../../config/plugins/Plugin.html#printObject()">printObject</a>=true)
</span><span class="modifiers">public class </span><span class="element-name type-name-label">DefaultRolloverStrategy</span>
<span class="extends-implements">extends <a href="AbstractRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">AbstractRolloverStrategy</a></span></div>
<div class="block">When rolling over, <code>DefaultRolloverStrategy</code> renames files according to an algorithm as described below.
<p>
The DefaultRolloverStrategy is a combination of a time-based policy and a fixed-window policy. When the file name
pattern contains a date format then the rollover time interval will be used to calculate the time to use in the file
pattern. When the file pattern contains an integer replacement token one of the counting techniques will be used.
</p>
<p>
When the ascending attribute is set to true (the default) then the counter will be incremented and the current log
file will be renamed to include the counter value. If the counter hits the maximum value then the oldest file, which
will have the smallest counter, will be deleted, all other files will be renamed to have their counter decremented
and then the current file will be renamed to have the maximum counter value. Note that with this counting strategy
specifying a large maximum value may entirely avoid renaming files.
</p>
<p>
When the ascending attribute is false, then the "normal" fixed-window strategy will be used.
</p>
<p>
Let <em>max</em> and <em>min</em> represent the values of respectively the <b>MaxIndex</b> and <b>MinIndex</b>
options. Let "foo.log" be the value of the <b>ActiveFile</b> option and "foo.%i.log" the value of
<b>FileNamePattern</b>. Then, when rolling over, the file <code>foo.<em>max</em>.log</code> will be deleted, the file
<code>foo.<em>max-1</em>.log</code> will be renamed as <code>foo.<em>max</em>.log</code>, the file
<code>foo.<em>max-2</em>.log</code> renamed as <code>foo.<em>max-1</em>.log</code>, and so on, the file
<code>foo.<em>min+1</em>.log</code> renamed as <code>foo.<em>min+2</em>.log</code>. Lastly, the active file
<code>foo.log</code> will be renamed as <code>foo.<em>min</em>.log</code> and a new active file name
<code>foo.log</code> will be created.
</p>
<p>
Given that this rollover algorithm requires as many file renaming operations as the window size, large window sizes
are discouraged.
</p></div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- ======== NESTED CLASS SUMMARY ======== -->
<li>
<section class="nested-class-summary" id="nested-class-summary">
<h2>Nested Class Summary</h2>
<div class="caption"><span>Nested Classes</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Class</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static class&nbsp;</code></div>
<div class="col-second even-row-color"><code><a href="DefaultRolloverStrategy.Builder.html" class="type-name-link" title="class in org.apache.logging.log4j.core.appender.rolling">DefaultRolloverStrategy.Builder</a></code></div>
<div class="col-last even-row-color">
<div class="block">Builds DefaultRolloverStrategy instances.</div>
</div>
</div>
</section>
</li>
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field-summary">
<h2>Field Summary</h2>
<div class="inherited-list">
<h3 id="fields-inherited-from-class-org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy">Fields inherited from class&nbsp;org.apache.logging.log4j.core.appender.rolling.<a href="AbstractRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">AbstractRolloverStrategy</a></h3>
<code><a href="AbstractRolloverStrategy.html#LOGGER">LOGGER</a>, <a href="AbstractRolloverStrategy.html#PATTERN_COUNTER">PATTERN_COUNTER</a>, <a href="AbstractRolloverStrategy.html#strSubstitutor">strSubstitutor</a></code></div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor-summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier</div>
<div class="table-header col-second">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>protected </code></div>
<div class="col-constructor-name even-row-color"><code><a href="#%3Cinit%3E(int,int,boolean,int,org.apache.logging.log4j.core.lookup.StrSubstitutor,org.apache.logging.log4j.core.appender.rolling.action.Action%5B%5D,boolean)" class="member-name-link">DefaultRolloverStrategy</a><wbr>(int&nbsp;minIndex,
int&nbsp;maxIndex,
boolean&nbsp;useMax,
int&nbsp;compressionLevel,
<a href="../../lookup/StrSubstitutor.html" title="class in org.apache.logging.log4j.core.lookup">StrSubstitutor</a>&nbsp;strSubstitutor,
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
boolean&nbsp;stopCustomActionsOnError)</code></div>
<div class="col-last even-row-color">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Since 2.9 Added tempCompressedFilePatternString parameter</div>
</div>
</div>
<div class="col-first odd-row-color"><code>protected </code></div>
<div class="col-constructor-name odd-row-color"><code><a href="#%3Cinit%3E(int,int,boolean,int,org.apache.logging.log4j.core.lookup.StrSubstitutor,org.apache.logging.log4j.core.appender.rolling.action.Action%5B%5D,boolean,java.lang.String)" class="member-name-link">DefaultRolloverStrategy</a><wbr>(int&nbsp;minIndex,
int&nbsp;maxIndex,
boolean&nbsp;useMax,
int&nbsp;compressionLevel,
<a href="../../lookup/StrSubstitutor.html" title="class in org.apache.logging.log4j.core.lookup">StrSubstitutor</a>&nbsp;strSubstitutor,
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
boolean&nbsp;stopCustomActionsOnError,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;tempCompressedFilePatternString)</code></div>
<div class="col-last odd-row-color">
<div class="block">Constructs a new instance.</div>
</div>
</div>
</section>
</li>
<!-- ========== METHOD SUMMARY =========== -->
<li>
<section class="method-summary" id="method-summary">
<h2>Method Summary</h2>
<div id="method-summary-table">
<div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div>
<div id="method-summary-table.tabpanel" role="tabpanel">
<div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Method</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code>static <a href="DefaultRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">DefaultRolloverStrategy</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6"><code><a href="#createStrategy(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.apache.logging.log4j.core.appender.rolling.action.Action%5B%5D,boolean,org.apache.logging.log4j.core.config.Configuration)" class="member-name-link">createStrategy</a><wbr>(<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;max,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;min,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fileIndex,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;compressionLevelStr,
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
boolean&nbsp;stopCustomActionsOnError,
<a href="../../config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a>&nbsp;config)</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4 method-summary-table-tab6">
<div class="block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Since 2.9 Usage of Builder API is preferable</div>
</div>
</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCompressionLevel()" class="member-name-link">getCompressionLevel</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>&gt;</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getCustomActions()" class="member-name-link">getCustomActions</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMaxIndex()" class="member-name-link">getMaxIndex</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>int</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getMinIndex()" class="member-name-link">getMinIndex</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="PatternProcessor.html" title="class in org.apache.logging.log4j.core.appender.rolling">PatternProcessor</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#getTempCompressedFilePattern()" class="member-name-link">getTempCompressedFilePattern</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isStopCustomActionsOnError()" class="member-name-link">isStopCustomActionsOnError</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code>boolean</code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#isUseMax()" class="member-name-link">isUseMax</a>()</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code>static <a href="DefaultRolloverStrategy.Builder.html" title="class in org.apache.logging.log4j.core.appender.rolling">DefaultRolloverStrategy.Builder</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4"><code><a href="#newBuilder()" class="member-name-link">newBuilder</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab1 method-summary-table-tab4">&nbsp;</div>
<div class="col-first odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="RolloverDescription.html" title="interface in org.apache.logging.log4j.core.appender.rolling">RolloverDescription</a></code></div>
<div class="col-second odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#rollover(org.apache.logging.log4j.core.appender.rolling.RollingFileManager)" class="member-name-link">rollover</a><wbr>(<a href="RollingFileManager.html" title="class in org.apache.logging.log4j.core.appender.rolling">RollingFileManager</a>&nbsp;manager)</code></div>
<div class="col-last odd-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">
<div class="block">Performs the rollover.</div>
</div>
<div class="col-first even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></code></div>
<div class="col-second even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4"><code><a href="#toString()" class="member-name-link">toString</a>()</code></div>
<div class="col-last even-row-color method-summary-table method-summary-table-tab2 method-summary-table-tab4">&nbsp;</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-org.apache.logging.log4j.core.appender.rolling.AbstractRolloverStrategy">Methods inherited from class&nbsp;org.apache.logging.log4j.core.appender.rolling.<a href="AbstractRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">AbstractRolloverStrategy</a></h3>
<code><a href="AbstractRolloverStrategy.html#getEligibleFiles(java.lang.String,java.lang.String)">getEligibleFiles</a>, <a href="AbstractRolloverStrategy.html#getEligibleFiles(java.lang.String,java.lang.String,boolean)">getEligibleFiles</a>, <a href="AbstractRolloverStrategy.html#getEligibleFiles(java.lang.String,java.lang.String,java.lang.String,boolean)">getEligibleFiles</a>, <a href="AbstractRolloverStrategy.html#getEligibleFiles(org.apache.logging.log4j.core.appender.rolling.RollingFileManager)">getEligibleFiles</a>, <a href="AbstractRolloverStrategy.html#getEligibleFiles(org.apache.logging.log4j.core.appender.rolling.RollingFileManager,boolean)">getEligibleFiles</a>, <a href="AbstractRolloverStrategy.html#getStrSubstitutor()">getStrSubstitutor</a>, <a href="AbstractRolloverStrategy.html#merge(org.apache.logging.log4j.core.appender.rolling.action.Action,java.util.List,boolean)">merge</a>, <a href="AbstractRolloverStrategy.html#suffixLength(java.lang.String)">suffixLength</a></code></div>
<div class="inherited-list">
<h3 id="methods-inherited-from-class-java.lang.Object">Methods inherited from class&nbsp;java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></h3>
<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--" title="class or interface in java.lang" class="external-link">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-" title="class or interface in java.lang" class="external-link">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--" title="class or interface in java.lang" class="external-link">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--" title="class or interface in java.lang" class="external-link">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--" title="class or interface in java.lang" class="external-link">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--" title="class or interface in java.lang" class="external-link">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--" title="class or interface in java.lang" class="external-link">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-" title="class or interface in java.lang" class="external-link">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-" title="class or interface in java.lang" class="external-link">wait</a></code></div>
</section>
</li>
</ul>
</section>
<section class="details">
<ul class="details-list">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor-detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(int,int,boolean,int,org.apache.logging.log4j.core.lookup.StrSubstitutor,org.apache.logging.log4j.core.appender.rolling.action.Action[],boolean)">
<h3>DefaultRolloverStrategy</h3>
<div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">protected</span>&nbsp;<span class="element-name">DefaultRolloverStrategy</span><wbr><span class="parameters">(int&nbsp;minIndex,
int&nbsp;maxIndex,
boolean&nbsp;useMax,
int&nbsp;compressionLevel,
<a href="../../lookup/StrSubstitutor.html" title="class in org.apache.logging.log4j.core.lookup">StrSubstitutor</a>&nbsp;strSubstitutor,
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
boolean&nbsp;stopCustomActionsOnError)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Since 2.9 Added tempCompressedFilePatternString parameter</div>
</div>
<div class="block">Constructs a new instance.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>minIndex</code> - The minimum index.</dd>
<dd><code>maxIndex</code> - The maximum index.</dd>
<dd><code>customActions</code> - custom actions to perform asynchronously after rollover</dd>
<dd><code>stopCustomActionsOnError</code> - whether to stop executing asynchronous actions if an error occurs</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(int,int,boolean,int,org.apache.logging.log4j.core.lookup.StrSubstitutor,org.apache.logging.log4j.core.appender.rolling.action.Action[],boolean,java.lang.String)">
<h3>DefaultRolloverStrategy</h3>
<div class="member-signature"><span class="modifiers">protected</span>&nbsp;<span class="element-name">DefaultRolloverStrategy</span><wbr><span class="parameters">(int&nbsp;minIndex,
int&nbsp;maxIndex,
boolean&nbsp;useMax,
int&nbsp;compressionLevel,
<a href="../../lookup/StrSubstitutor.html" title="class in org.apache.logging.log4j.core.lookup">StrSubstitutor</a>&nbsp;strSubstitutor,
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
boolean&nbsp;stopCustomActionsOnError,
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;tempCompressedFilePatternString)</span></div>
<div class="block">Constructs a new instance.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>minIndex</code> - The minimum index.</dd>
<dd><code>maxIndex</code> - The maximum index.</dd>
<dd><code>customActions</code> - custom actions to perform asynchronously after rollover</dd>
<dd><code>stopCustomActionsOnError</code> - whether to stop executing asynchronous actions if an error occurs</dd>
<dd><code>tempCompressedFilePatternString</code> - File pattern of the working file
used during compression, if null no temporary file are used</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method-detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="newBuilder()">
<h3>newBuilder</h3>
<div class="member-signature"><span class="annotations"><a href="../../config/plugins/PluginBuilderFactory.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginBuilderFactory</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DefaultRolloverStrategy.Builder.html" title="class in org.apache.logging.log4j.core.appender.rolling">DefaultRolloverStrategy.Builder</a></span>&nbsp;<span class="element-name">newBuilder</span>()</div>
</section>
</li>
<li>
<section class="detail" id="createStrategy(java.lang.String,java.lang.String,java.lang.String,java.lang.String,org.apache.logging.log4j.core.appender.rolling.action.Action[],boolean,org.apache.logging.log4j.core.config.Configuration)">
<h3>createStrategy</h3>
<div class="member-signature"><span class="annotations"><a href="../../config/plugins/PluginFactory.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginFactory</a>
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link">@Deprecated</a>
</span><span class="modifiers">public static</span>&nbsp;<span class="return-type"><a href="DefaultRolloverStrategy.html" title="class in org.apache.logging.log4j.core.appender.rolling">DefaultRolloverStrategy</a></span>&nbsp;<span class="element-name">createStrategy</span><wbr><span class="parameters">(<a href="../../config/plugins/PluginAttribute.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginAttribute</a>("max")
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;max,
<a href="../../config/plugins/PluginAttribute.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginAttribute</a>("min")
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;min,
<a href="../../config/plugins/PluginAttribute.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginAttribute</a>("fileIndex")
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;fileIndex,
<a href="../../config/plugins/PluginAttribute.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginAttribute</a>("compressionLevel")
<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a>&nbsp;compressionLevelStr,
<a href="../../config/plugins/PluginElement.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginElement</a>("Actions")
<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>[]&nbsp;customActions,
<a href="../../config/plugins/PluginAttribute.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginAttribute</a>(<a href="../../config/plugins/PluginAttribute.html#value()">value</a>="stopCustomActionsOnError",<a href="../../config/plugins/PluginAttribute.html#defaultBoolean()">defaultBoolean</a>=true)
boolean&nbsp;stopCustomActionsOnError,
<a href="../../config/plugins/PluginConfiguration.html" title="annotation in org.apache.logging.log4j.core.config.plugins">@PluginConfiguration</a>
<a href="../../config/Configuration.html" title="interface in org.apache.logging.log4j.core.config">Configuration</a>&nbsp;config)</span></div>
<div class="deprecation-block"><span class="deprecated-label">Deprecated.</span>
<div class="deprecation-comment">Since 2.9 Usage of Builder API is preferable</div>
</div>
<div class="block">Creates the DefaultRolloverStrategy.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>max</code> - The maximum number of files to keep.</dd>
<dd><code>min</code> - The minimum number of files to keep.</dd>
<dd><code>fileIndex</code> - If set to "max" (the default), files with a higher index will be newer than files with a smaller
index. If set to "min", file renaming and the counter will follow the Fixed Window strategy.</dd>
<dd><code>compressionLevelStr</code> - The compression level, 0 (less) through 9 (more); applies only to ZIP files.</dd>
<dd><code>customActions</code> - custom actions to perform asynchronously after rollover</dd>
<dd><code>stopCustomActionsOnError</code> - whether to stop executing asynchronous actions if an error occurs</dd>
<dd><code>config</code> - The Configuration.</dd>
<dt>Returns:</dt>
<dd>A DefaultRolloverStrategy.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getCompressionLevel()">
<h3>getCompressionLevel</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getCompressionLevel</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getCustomActions()">
<h3>getCustomActions</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/util/List.html" title="class or interface in java.util" class="external-link">List</a>&lt;<a href="action/Action.html" title="interface in org.apache.logging.log4j.core.appender.rolling.action">Action</a>&gt;</span>&nbsp;<span class="element-name">getCustomActions</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getMaxIndex()">
<h3>getMaxIndex</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMaxIndex</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getMinIndex()">
<h3>getMinIndex</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getMinIndex</span>()</div>
</section>
</li>
<li>
<section class="detail" id="isStopCustomActionsOnError()">
<h3>isStopCustomActionsOnError</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isStopCustomActionsOnError</span>()</div>
</section>
</li>
<li>
<section class="detail" id="isUseMax()">
<h3>isUseMax</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">boolean</span>&nbsp;<span class="element-name">isUseMax</span>()</div>
</section>
</li>
<li>
<section class="detail" id="getTempCompressedFilePattern()">
<h3>getTempCompressedFilePattern</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="PatternProcessor.html" title="class in org.apache.logging.log4j.core.appender.rolling">PatternProcessor</a></span>&nbsp;<span class="element-name">getTempCompressedFilePattern</span>()</div>
</section>
</li>
<li>
<section class="detail" id="rollover(org.apache.logging.log4j.core.appender.rolling.RollingFileManager)">
<h3>rollover</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="RolloverDescription.html" title="interface in org.apache.logging.log4j.core.appender.rolling">RolloverDescription</a></span>&nbsp;<span class="element-name">rollover</span><wbr><span class="parameters">(<a href="RollingFileManager.html" title="class in org.apache.logging.log4j.core.appender.rolling">RollingFileManager</a>&nbsp;manager)</span>
throws <span class="exceptions"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link">SecurityException</a></span></div>
<div class="block">Performs the rollover.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>manager</code> - The RollingFileManager name for current active log file.</dd>
<dt>Returns:</dt>
<dd>A RolloverDescription.</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link">SecurityException</a></code> - if an error occurs.</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="toString()">
<h3>toString</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type"><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html" title="class or interface in java.lang" class="external-link">String</a></span>&nbsp;<span class="element-name">toString</span>()</div>
<dl class="notes">
<dt>Overrides:</dt>
<dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--" title="class or interface in java.lang" class="external-link">toString</a></code>&nbsp;in class&nbsp;<code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html" title="class or interface in java.lang" class="external-link">Object</a></code></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
</ul>
</section>
<!-- ========= END OF CLASS DATA ========= -->
</main>
<footer role="contentinfo">
<hr>
<p class="legal-copy"><small><p align="center"> Copyright &copy; 1999-2024 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved.<br/> Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation. </p></small></p>
</footer>
</div>
</div>
</body>
</html>