Package org.opends.server.loggers
Interface RotationPolicy<T extends LogRotationPolicyCfg>
-
- Type Parameters:
T
- The type of rotation policy configuration handled by this retention policy implementation.
- All Known Implementing Classes:
FixedTimeRotationPolicy
,SizeBasedRotationPolicy
,TimeLimitRotationPolicy
public interface RotationPolicy<T extends LogRotationPolicyCfg>
This interface describes the rotation policy that should be used for the logger. Supported policies include size based and time based.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
initializeLogRotationPolicy(T config)
Initializes this log rotation policy based on the information in the provided rotation policy configuration.boolean
rotateFile(RotatableLogFile writer)
This method indicates if the log file should be rotated or not.
-
-
-
Method Detail
-
initializeLogRotationPolicy
void initializeLogRotationPolicy(T config) throws ConfigException, InitializationException
Initializes this log rotation policy based on the information in the provided rotation policy configuration.- Parameters:
config
- The rotation policy configuration that contains the information to use to initialize this policy.- Throws:
ConfigException
- If an unrecoverable problem arises in the process of performing the initialization as a result of the server configuration.InitializationException
- If a problem occurs during initialization that is not related to the server configuration.
-
rotateFile
boolean rotateFile(RotatableLogFile writer)
This method indicates if the log file should be rotated or not.- Parameters:
writer
- the file writer to be checked.- Returns:
- true if the log file should be rotated, false otherwise.
-
-