cleanup
public int cleanup(File directory,
int olderThan,
int keepMaxReleases,
int keepMinReleases)
delete releases which are older than the given parameter (in days, from today's midnight).
This rule has two constraints:
when there are still more than the keepMaxReleases available, also releases within the olderThan
range are deleted, the oldest first until the keepMaxReleases is reached.
The keepMinReleases prevents the deletion of releases in case there are only few ones
even when they are older than the olderThan parameter.
- Parameters:
olderThan - keepMaxReleases - keepMinReleases -
- Returns:
- the total number of deleted releases