Package org.forgerock.audit.retention
Class FreeDiskSpaceRetentionPolicy
- java.lang.Object
 - 
- org.forgerock.audit.retention.FreeDiskSpaceRetentionPolicy
 
 
- 
- All Implemented Interfaces:
 RetentionPolicy
public class FreeDiskSpaceRetentionPolicy extends Object implements RetentionPolicy
ARetentionPolicythat will retain/delete log files given a minimum amount of disk space the file system must contain. 
- 
- 
Constructor Summary
Constructors Constructor Description FreeDiskSpaceRetentionPolicy(long minFreeSpaceRequired)Constructs aFreeDiskSpaceRetentionPolicygiven a minimum amount of disk space the file system must contain. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<File>deleteFiles(boolean hasRotated, FileNamingPolicy fileNamingPolicy)Returns all files that should be deleted according to the policy. 
 - 
 
- 
- 
Constructor Detail
- 
FreeDiskSpaceRetentionPolicy
public FreeDiskSpaceRetentionPolicy(long minFreeSpaceRequired)
Constructs aFreeDiskSpaceRetentionPolicygiven 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:RetentionPolicyReturns all files that should be deleted according to the policy.- Specified by:
 deleteFilesin interfaceRetentionPolicy- Parameters:
 hasRotated-trueif 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.
 
 
 - 
 
 -