Interface RetentionPolicy

All Known Implementing Classes:
DiskSpaceUsedRetentionPolicy, FreeDiskSpaceRetentionPolicy, SizeBasedRetentionPolicy

public interface RetentionPolicy
Defines the retention conditions and the files that need to be deleted.
  • Method Summary

    Modifier and Type
    Method
    Description
    deleteFiles(boolean hasRotated, FileNamingPolicy fileNamingPolicy)
    Returns all files that should be deleted according to the policy.
  • Method Details

    • deleteFiles

      List<File> deleteFiles(boolean hasRotated, FileNamingPolicy fileNamingPolicy)
      Returns all files that should be deleted according to the policy.
      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.