|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.loggers.SizeBasedRetentionPolicy
public class SizeBasedRetentionPolicy
This class implements a retention policy based on the amount of space taken by the log files.
Constructor Summary | |
---|---|
SizeBasedRetentionPolicy()
|
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(SizeLimitLogRetentionPolicyCfg config)
Applies the configuration changes to this change listener. |
java.io.File[] |
deleteFiles(FileNamingPolicy fileNamingPolicy)
Returns all files that should be deleted according to the policy. |
void |
initializeLogRetentionPolicy(SizeLimitLogRetentionPolicyCfg config)
Initializes this log retention policy based on the information in the provided retention policy configuration. |
boolean |
isConfigurationChangeAcceptable(SizeLimitLogRetentionPolicyCfg config,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SizeBasedRetentionPolicy()
Method Detail |
---|
public void initializeLogRetentionPolicy(SizeLimitLogRetentionPolicyCfg config)
initializeLogRetentionPolicy
in interface RetentionPolicy<SizeLimitLogRetentionPolicyCfg>
config
- The retention policy configuration that contains the
information to use to initialize this policy.public boolean isConfigurationChangeAcceptable(SizeLimitLogRetentionPolicyCfg config, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<SizeLimitLogRetentionPolicyCfg>
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(SizeLimitLogRetentionPolicyCfg config)
applyConfigurationChange
in interface ConfigurationChangeListener<SizeLimitLogRetentionPolicyCfg>
config
- The new configuration containing the changes.
public java.io.File[] deleteFiles(FileNamingPolicy fileNamingPolicy) throws DirectoryException
deleteFiles
in interface RetentionPolicy<SizeLimitLogRetentionPolicyCfg>
fileNamingPolicy
- The naming policy used generate the log file
names.
null
if an error occured while
obtaining the file list.
DirectoryException
- If an error occurs while obtaining a list
of files to delete.public java.lang.String toString()
toString
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |