Class SizeBasedRotationPolicy

  • All Implemented Interfaces:
    RotationPolicy

    public class SizeBasedRotationPolicy
    extends Object
    implements RotationPolicy
    Creates a file size based rotation policy. Once a file is a given size in bytes it is rotated.
    • Constructor Detail

      • SizeBasedRotationPolicy

        public SizeBasedRotationPolicy​(long maxFileSizeInBytes)
        Constructs a SizeBasedRotationPolicy given a max file size in bytes.
        Parameters:
        maxFileSizeInBytes - A max file size in bytes.
    • Method Detail

      • getMaxFileSizeInBytes

        public long getMaxFileSizeInBytes()
        Gets the maximum size (in bytes) a file may grow to before being rotated.
        Returns:
        the maximum file size permitted by this policy.