Package org.forgerock.audit.retention
Class DiskSpaceUsedRetentionPolicy
java.lang.Object
org.forgerock.audit.retention.DiskSpaceUsedRetentionPolicy
- All Implemented Interfaces:
RetentionPolicy
A
RetentionPolicy that will retain/delete log files based off the total disk space used.-
Constructor Summary
ConstructorsConstructorDescriptionDiskSpaceUsedRetentionPolicy(long maxDiskSpaceToUse) Constructs aDiskSpaceUsedRetentionPolicywith a given maximum of disk space to use in bytes. -
Method Summary
Modifier and TypeMethodDescriptiondeleteFiles(boolean hasRotated, FileNamingPolicy fileNamingPolicy) Returns all files that should be deleted according to the policy.
-
Constructor Details
-
DiskSpaceUsedRetentionPolicy
public DiskSpaceUsedRetentionPolicy(long maxDiskSpaceToUse) Constructs aDiskSpaceUsedRetentionPolicywith a given maximum of disk space to use in bytes.- Parameters:
maxDiskSpaceToUse- The maximum amount of disk space the historical audit files can occupy.
-
-
Method Details
-
deleteFiles
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.
-