Package jetbrains.buildServer.agent
Interface AgentDiskSpaceCleanerExtension
-
- All Superinterfaces:
AgentExtension
,TeamCityExtension
- All Known Implementing Classes:
ArtifactsCacheCleanersProvider
,OldCheckoutDirectoriesCleaner
,OldFoldersCleaner
public interface AgentDiskSpaceCleanerExtension extends AgentExtension
This extension point is called to ensure free space on the agent's disks when it's required. UnlikeDirectoryCleanersProvider
this cleaners are running without build context. So if you want to clean space when build is running you should useDirectoryCleanersProvider
, without build - this extension.- Since:
- 2018.2
- Author:
- Maxim Zaytsev (maxim.zaytsev@jetbrains.com) Date: 01.08.12 16:51
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
cleanup(CleanupParameters cleanupParameters)
called when system needs free disk space.List<File>
getCleanedRoots()
Returns list of directories where plugin stores cache-files.String
getCleanerName()
-
-
-
Method Detail
-
getCleanerName
@NotNull String getCleanerName()
- Returns:
- cleaner name to be shown in agent and build logs
-
getCleanedRoots
@NotNull List<File> getCleanedRoots()
Returns list of directories where plugin stores cache-files. This method always is invoked beforecleanup(CleanupParameters)
.- Returns:
- List of directories where plugin stores cache-files.
-
cleanup
void cleanup(@NotNull CleanupParameters cleanupParameters)
called when system needs free disk space. This method can be invoked repeatedly with differentCleanupParameters
.CleanupParameters.getFilesToCleanup()
contains some directories which was returned bygetCleanedRoots()
method. Plugin must remove files and directories specified byCleanupParameters.getFilesToCleanup()
if file was not used in specified time frame, seeCleanupParameters.getTTL()
.- Parameters:
cleanupParameters
-CleanupParameters
for current cleanup procedure
-
-