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 Details

    • 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:
    • ANY_DISK_SPACE

      public static final long ANY_DISK_SPACE
      The 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

      public List<RetentionPolicy> buildRetentionPolicies()
      Builds RetentionPolicy instances from configuration options.
      Returns:
      RetentionPolicy instances