Class DefaultRolloverStrategy.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • build

        public DefaultRolloverStrategy build()
        Description copied from interface: Builder
        Builds the object after all configuration has been set. This will use default values for any unspecified attributes for the object.
        Specified by:
        build in interface Builder<DefaultRolloverStrategy>
        Returns:
        the configured instance.
      • getMax

        public java.lang.String getMax()
      • setMax

        public DefaultRolloverStrategy.Builder setMax​(java.lang.String max)
        Defines the maximum number of files to keep.
        Parameters:
        max - The maximum number of files to keep.
        Returns:
        This builder for chaining convenience
        Since:
        2.26.0
      • getMin

        public java.lang.String getMin()
      • setMin

        public DefaultRolloverStrategy.Builder setMin​(java.lang.String min)
        Defines the minimum number of files to keep.
        Parameters:
        min - The minimum number of files to keep.
        Returns:
        This builder for chaining convenience
        Since:
        2.26.0
      • getFileIndex

        public java.lang.String getFileIndex()
      • setFileIndex

        public DefaultRolloverStrategy.Builder setFileIndex​(java.lang.String fileIndex)
        Defines the file index for rolling strategy.
        Parameters:
        fileIndex - 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.
        Returns:
        This builder for chaining convenience
        Since:
        2.26.0
      • getCompressionLevelStr

        public java.lang.String getCompressionLevelStr()
      • setCompressionLevelStr

        public DefaultRolloverStrategy.Builder setCompressionLevelStr​(java.lang.String compressionLevelStr)
        Defines compression level.
        Parameters:
        compressionLevelStr - The compression level, 0 (less) through 9 (more); applies only to ZIP files.
        Returns:
        This builder for chaining convenience
        Since:
        2.26.0
      • getCustomActions

        public Action[] getCustomActions()
      • setCustomActions

        public DefaultRolloverStrategy.Builder setCustomActions​(Action[] customActions)
        Defines custom actions.
        Parameters:
        customActions - custom actions to perform asynchronously after rollover
        Returns:
        This builder for chaining convenience
        Since:
        2.26.0
      • isStopCustomActionsOnError

        public boolean isStopCustomActionsOnError()
      • setStopCustomActionsOnError

        public DefaultRolloverStrategy.Builder setStopCustomActionsOnError​(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
        Since:
        2.26.0
      • getTempCompressedFilePattern

        public java.lang.String getTempCompressedFilePattern()
      • setTempCompressedFilePattern

        public DefaultRolloverStrategy.Builder setTempCompressedFilePattern​(java.lang.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
        Since:
        2.26.0