Class FileBasedEventHandlerConfiguration.FileRetention
- java.lang.Object
-
- org.forgerock.audit.events.handlers.FileBasedEventHandlerConfiguration.FileRetention
-
- Enclosing class:
- FileBasedEventHandlerConfiguration
public static class FileBasedEventHandlerConfiguration.FileRetention extends Object
Groups the file retention config parameters.
-
-
Field Summary
Fields Modifier and Type Field Description static long
ANY_DISK_SPACE
The disk space value when disk space is unrestricted.static int
UNLIMITED_HISTORY_FILES
The value of number of history files to use when the value is unlimited.
-
Constructor Summary
Constructors Constructor Description FileRetention()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<RetentionPolicy>
buildRetentionPolicies()
BuildsRetentionPolicy
instances from configuration options.long
getMaxDiskSpaceToUse()
Gets the maximum disk space the audit logs can occupy.int
getMaxNumberOfHistoryFiles()
Gets the maximum number of historical log files to retain.long
getMinFreeSpaceRequired()
Gets the minimum free space the system must contain.void
setMaxDiskSpaceToUse(long maxDiskSpaceToUse)
Sets the maximum disk space the audit logs can occupy.void
setMaxNumberOfHistoryFiles(int maxNumberOfHistoryFiles)
Sets the maximum number of historical log files to retain.void
setMinFreeSpaceRequired(long minFreeSpaceRequired)
Sets the minimum free space the system must contain.
-
-
-
Field Detail
-
UNLIMITED_HISTORY_FILES
public static final int UNLIMITED_HISTORY_FILES
The value of number of history files to use when the value is unlimited.- See Also:
- Constant Field Values
-
ANY_DISK_SPACE
public static final long ANY_DISK_SPACE
The disk space value when disk space is unrestricted.- See Also:
- Constant Field Values
-
-
Method Detail
-
getMaxNumberOfHistoryFiles
public int getMaxNumberOfHistoryFiles()
Gets the maximum number of historical log files to retain. -1 disables pruning of old history files.- Returns:
- The maximum number of log files. -1 disables pruning of old history files.
-
setMaxNumberOfHistoryFiles
public void setMaxNumberOfHistoryFiles(int maxNumberOfHistoryFiles)
Sets the maximum number of historical log files to retain. -1 disables pruning of old history files.- Parameters:
maxNumberOfHistoryFiles
- The maximum number of log files. -1 disables pruning of old history files.
-
getMaxDiskSpaceToUse
public long getMaxDiskSpaceToUse()
Gets the maximum disk space the audit logs can occupy. A negative or zero value indicates this policy is disabled.- Returns:
- The maximum disk space the audit logs can occupy.
-
setMaxDiskSpaceToUse
public void setMaxDiskSpaceToUse(long maxDiskSpaceToUse)
Sets the maximum disk space the audit logs can occupy. A negative or zero value indicates this policy is disabled.- Parameters:
maxDiskSpaceToUse
- The maximum disk space the audit logs can occupy.
-
getMinFreeSpaceRequired
public long getMinFreeSpaceRequired()
Gets the minimum free space the system must contain. A negative or zero value indicates this policy is disabled.- Returns:
- The minimum free space the system must contain.
-
setMinFreeSpaceRequired
public void setMinFreeSpaceRequired(long minFreeSpaceRequired)
Sets the minimum free space the system must contain. A negative or zero value indicates this policy is disabled.- Parameters:
minFreeSpaceRequired
- The minimum free space the system must contain.
-
buildRetentionPolicies
public List<RetentionPolicy> buildRetentionPolicies()
BuildsRetentionPolicy
instances from configuration options.- Returns:
RetentionPolicy
instances
-
-