public class FixedTimeRotationPolicy extends Object implements RotationPolicy<FixedTimeLogRotationPolicyCfg>, ConfigurationChangeListener<FixedTimeLogRotationPolicyCfg>
Constructor and Description |
---|
FixedTimeRotationPolicy() |
Modifier and Type | Method and Description |
---|---|
ConfigChangeResult |
applyConfigurationChange(FixedTimeLogRotationPolicyCfg config)
Applies the configuration changes to this change listener.
|
void |
initializeLogRotationPolicy(FixedTimeLogRotationPolicyCfg config)
Initializes this log rotation policy based on the information in the provided rotation policy configuration.
|
boolean |
isConfigurationChangeAcceptable(FixedTimeLogRotationPolicyCfg 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(FixedTimeLogRotationPolicyCfg config)
RotationPolicy
initializeLogRotationPolicy
in interface RotationPolicy<FixedTimeLogRotationPolicyCfg>
config
- The rotation policy configuration that contains the information to use to initialize this policy.public boolean isConfigurationChangeAcceptable(FixedTimeLogRotationPolicyCfg config, List<LocalizableMessage> unacceptableReasons)
ConfigurationChangeListener
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<FixedTimeLogRotationPolicyCfg>
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(FixedTimeLogRotationPolicyCfg config)
ConfigurationChangeListener
applyConfigurationChange
in interface ConfigurationChangeListener<FixedTimeLogRotationPolicyCfg>
config
- The new configuration containing the changes.public boolean rotateFile(RotatableLogFile writer)
RotationPolicy
rotateFile
in interface RotationPolicy<FixedTimeLogRotationPolicyCfg>
writer
- the file writer to be checked.Copyright 2010-2022 ForgeRock AS.