Class DirectWriteRolloverStrategy.Builder
java.lang.Object
org.apache.logging.log4j.core.appender.rolling.DirectWriteRolloverStrategy.Builder
- All Implemented Interfaces:
- Builder<DirectWriteRolloverStrategy>
- Enclosing class:
- DirectWriteRolloverStrategy
public static class DirectWriteRolloverStrategy.Builder
extends Object
implements Builder<DirectWriteRolloverStrategy>
Builds DirectWriteRolloverStrategy instances.
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds the object after all configuration has been set.Action[]booleanwithCompressionLevelStr(String compressionLevelStr) Defines compression level.withConfig(Configuration config) Defines configuration.withCustomActions(Action[] customActions) Defines custom actions.withMaxFiles(String maxFiles) Defines the maximum number of files to keep.withStopCustomActionsOnError(boolean stopCustomActionsOnError) Defines whether to stop executing asynchronous actions if an error occurs.withTempCompressedFilePattern(String tempCompressedFilePattern) Defines temporary compression file pattern.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.logging.log4j.core.util.BuildergetErrorPrefix, isValid
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
buildDescription copied from interface:BuilderBuilds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.- Specified by:
- buildin interface- Builder<DirectWriteRolloverStrategy>
- Returns:
- the configured instance.
 
- 
getMaxFiles
- 
withMaxFilesDefines the maximum number of files to keep.- Parameters:
- maxFiles- The maximum number of files that match the date portion of the pattern to keep.
- Returns:
- This builder for chaining convenience
 
- 
getCompressionLevelStr
- 
withCompressionLevelStrDefines compression level.- Parameters:
- compressionLevelStr- The compression level, 0 (less) through 9 (more); applies only to ZIP files.
- Returns:
- This builder for chaining convenience
 
- 
getCustomActions
- 
withCustomActionsDefines custom actions.- Parameters:
- customActions- custom actions to perform asynchronously after rollover
- Returns:
- This builder for chaining convenience
 
- 
isStopCustomActionsOnErrorpublic boolean isStopCustomActionsOnError()
- 
withStopCustomActionsOnErrorpublic DirectWriteRolloverStrategy.Builder withStopCustomActionsOnError(boolean stopCustomActionsOnError) Defines whether to stop executing asynchronous actions if an error occurs.- Parameters:
- stopCustomActionsOnError- whether to stop executing asynchronous actions if an error occurs
- Returns:
- This builder for chaining convenience
 
- 
getTempCompressedFilePattern
- 
withTempCompressedFilePatternpublic DirectWriteRolloverStrategy.Builder withTempCompressedFilePattern(String tempCompressedFilePattern) Defines temporary compression file pattern.- Parameters:
- tempCompressedFilePattern- File pattern of the working file pattern used during compression, if null no temporary file are used
- Returns:
- This builder for chaining convenience
 
- 
getConfig
- 
withConfigDefines configuration.- Parameters:
- config- The Configuration.
- Returns:
- This builder for chaining convenience
 
 
-