public class TimeLimitRotationPolicy extends Object implements RotationPolicy<TimeLimitLogRotationPolicyCfg>, ConfigurationChangeListener<TimeLimitLogRotationPolicyCfg>
Constructor and Description |
---|
TimeLimitRotationPolicy() |
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(TimeLimitLogRotationPolicyCfg config)
Applies the configuration changes to this change listener.
|
void |
initializeLogRotationPolicy(TimeLimitLogRotationPolicyCfg config)
Initializes this log rotation policy based on the information in the provided rotation policy configuration.
|
boolean |
isConfigurationChangeAcceptable(TimeLimitLogRotationPolicyCfg config,
List<LocalizableMessage> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable
to this change listener.
|
boolean |
rotateFile(RotatableLogFile writer)
This method indicates if the log file should be rotated or not.
|
public void initializeLogRotationPolicy(TimeLimitLogRotationPolicyCfg config)
RotationPolicy
initializeLogRotationPolicy
in interface RotationPolicy<TimeLimitLogRotationPolicyCfg>
config
- The rotation policy configuration that contains the information to use to initialize this policy.public boolean isConfigurationChangeAcceptable(TimeLimitLogRotationPolicyCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<TimeLimitLogRotationPolicyCfg>
config
- The new configuration containing the changes.unacceptableReasons
- A list that can be used to hold messages about why the
provided configuration is not acceptable.true
if the proposed change is acceptable,
or false
if it is not.public ConfigChangeResult applyConfigurationChange(TimeLimitLogRotationPolicyCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<TimeLimitLogRotationPolicyCfg>
config
- The new configuration containing the changes.public boolean rotateFile(RotatableLogFile writer)
rotateFile
in interface RotationPolicy<TimeLimitLogRotationPolicyCfg>
writer
- The multi file text writer written the log file.Copyright 2010-2022 ForgeRock AS.