Package org.opends.server.loggers
Interface RetentionPolicy<T extends LogRetentionPolicyCfg>
-
- Type Parameters:
T
- The type of retention policy configuration handled by this retention policy implementation.
- All Known Implementing Classes:
FileNumberRetentionPolicy
,FreeDiskSpaceRetentionPolicy
,SizeBasedRetentionPolicy
public interface RetentionPolicy<T extends LogRetentionPolicyCfg>
This interface describes the retention policy that should be used for the logger. Supported policies include number of files and disk utilization.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Path[]
deleteFiles(org.opends.server.loggers.FileNamingPolicy fileNamingPolicy)
Returns all files that should be deleted according to the policy.void
initializeLogRetentionPolicy(T config)
Initializes this log retention policy based on the information in the provided retention policy configuration.
-
-
-
Method Detail
-
initializeLogRetentionPolicy
void initializeLogRetentionPolicy(T config) throws ConfigException, InitializationException
Initializes this log retention policy based on the information in the provided retention policy configuration.- Parameters:
config
- The retention 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.
-
deleteFiles
Path[] deleteFiles(org.opends.server.loggers.FileNamingPolicy fileNamingPolicy) throws IOException
Returns all files that should be deleted according to the policy.- Parameters:
fileNamingPolicy
- The naming policy used generate the log file names.- Returns:
- An array of files that should be deleted according to the policy or
null
if an error occurred while obtaining the file list. - Throws:
IOException
- If an error occurs while obtaining a list of files to delete.
-
-