Package hudson.plugins.jobConfigHistory
Interface Purgeable
- All Known Implementing Classes:
FileHistoryDao
public interface Purgeable
Implementors support periodic purging of history entries.
- Author:
- Brandon Koepke
-
Method Summary
Modifier and TypeMethodDescriptionboolean
isCreatedEntry
(File historyDir) Determines whether the specified directory should be dropped or not.void
purgeOldEntries
(File itemHistoryRoot, int maxEntries) Purges entries when there are more entries than specified by max entries.
-
Method Details
-
purgeOldEntries
Purges entries when there are more entries than specified by max entries.The purge will drop old entries according to:
sort(entries, e.timestamp()); for (int i = maxEntries; i < entries.length(); i++) drop(entries[i]);
- Parameters:
itemHistoryRoot
- the history root to drop entries from.maxEntries
- the maximum number of entries to retain.
-
isCreatedEntry
Determines whether the specified directory should be dropped or not.- Parameters:
historyDir
- the directory to check against.- Returns:
- true if it can be deleted, false otherwise.
-