public class DiskSpaceUsedRetentionPolicy extends Object implements RetentionPolicy
RetentionPolicy
that will retain/delete log files based off the total disk space used.Constructor and Description |
---|
DiskSpaceUsedRetentionPolicy(long maxDiskSpaceToUse)
Constructs a
DiskSpaceUsedRetentionPolicy with a given maximum of disk space to use in bytes. |
Modifier and Type | Method and Description |
---|---|
List<File> |
deleteFiles(boolean hasRotated,
FileNamingPolicy fileNamingPolicy)
Returns all files that should be deleted according to the policy.
|
public DiskSpaceUsedRetentionPolicy(long maxDiskSpaceToUse)
DiskSpaceUsedRetentionPolicy
with a given maximum of disk space to use in bytes.maxDiskSpaceToUse
- The maximum amount of disk space the historical audit files can occupy.public List<File> deleteFiles(boolean hasRotated, FileNamingPolicy fileNamingPolicy)
RetentionPolicy
deleteFiles
in interface RetentionPolicy
hasRotated
- true
if one of the rotation policies rotated the file at last call.fileNamingPolicy
- The naming policy used generate the log file names.Copyright 2010-2018 ForgeRock AS.