Class FileBasedEventHandlerConfiguration.FileRetention
java.lang.Object
org.forgerock.audit.events.handlers.FileBasedEventHandlerConfiguration.FileRetention
- Enclosing class:
- FileBasedEventHandlerConfiguration
Groups the file retention config parameters.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final long
The disk space value when disk space is unrestricted.static final int
The value of number of history files to use when the value is unlimited. -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionBuildsRetentionPolicy
instances from configuration options.long
Gets the maximum disk space the audit logs can occupy.int
Gets the maximum number of historical log files to retain.long
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 Details
-
UNLIMITED_HISTORY_FILES
public static final int UNLIMITED_HISTORY_FILESThe value of number of history files to use when the value is unlimited.- See Also:
-
ANY_DISK_SPACE
public static final long ANY_DISK_SPACEThe disk space value when disk space is unrestricted.- See Also:
-
-
Constructor Details
-
FileRetention
public FileRetention()
-
-
Method Details
-
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
BuildsRetentionPolicy
instances from configuration options.- Returns:
RetentionPolicy
instances
-