Class FreeDiskSpaceRetentionPolicy

    • Constructor Detail

      • FreeDiskSpaceRetentionPolicy

        public FreeDiskSpaceRetentionPolicy​(long minFreeSpaceRequired)
        Constructs a FreeDiskSpaceRetentionPolicy given a minimum amount of disk space the file system must contain.
        Parameters:
        minFreeSpaceRequired - The minimum amount of free disk space the the file system must contain in bytes.
    • Method Detail

      • deleteFiles

        public List<File> deleteFiles​(boolean hasRotated,
                                      FileNamingPolicy fileNamingPolicy)
        Description copied from interface: RetentionPolicy
        Returns all files that should be deleted according to the policy.
        Specified by:
        deleteFiles in interface RetentionPolicy
        Parameters:
        hasRotated - true if one of the rotation policies rotated the file at last call.
        fileNamingPolicy - The naming policy used generate the log file names.
        Returns:
        Not-null, An array of files that should be deleted according to the policy.