Class BuildArtifactsCleaner
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.extensions.BuildArtifactsCleaner
-
- All Implemented Interfaces:
BuildsCleanupExtension
,ServerExtension
,TeamCityExtension
public class BuildArtifactsCleaner extends Object implements BuildsCleanupExtension
-
-
Constructor Summary
Constructors Constructor Description BuildArtifactsCleaner(EventDispatcher<FileCleanListener> cleanEventDispatcher)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
cleanupBuildsData(BuildCleanupContext context)
Invoked afterBuildsCleanupExtension.prepareBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
is called for all extensions.int
getCleanupBuildsDataConcurrencyLevel()
This method is called beforeBuildsCleanupExtension.cleanupBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
to calculate the number of threads that will be used for processing build package.String
getDisplayName()
Returns the extension name to display in the UI.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface jetbrains.buildServer.serverSide.cleanup.BuildsCleanupExtension
prepareBuildsData
-
-
-
-
Constructor Detail
-
BuildArtifactsCleaner
public BuildArtifactsCleaner(@NotNull EventDispatcher<FileCleanListener> cleanEventDispatcher)
-
-
Method Detail
-
getDisplayName
@NotNull public String getDisplayName()
Description copied from interface:BuildsCleanupExtension
Returns the extension name to display in the UI.- Specified by:
getDisplayName
in interfaceBuildsCleanupExtension
-
cleanupBuildsData
public void cleanupBuildsData(@NotNull BuildCleanupContext context) throws IOException, CleanupInterruptedException
Description copied from interface:BuildsCleanupExtension
Invoked afterBuildsCleanupExtension.prepareBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
is called for all extensions. There is no guarantee about ordering of the method execution for different extensions, they may be called simultaneously etc. It should perform db operations in current thread otherwise deadlock can occur.- Specified by:
cleanupBuildsData
in interfaceBuildsCleanupExtension
- Parameters:
context
- cleanup context- Throws:
CleanupInterruptedException
- if the cleanup process was interruptedIOException
-
getCleanupBuildsDataConcurrencyLevel
public int getCleanupBuildsDataConcurrencyLevel()
Description copied from interface:BuildsCleanupExtension
This method is called beforeBuildsCleanupExtension.cleanupBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
to calculate the number of threads that will be used for processing build package. Once the number is calculated, build package will be evenly splitted among these threads andBuildsCleanupExtension.cleanupBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
will be called for each of them.- Specified by:
getCleanupBuildsDataConcurrencyLevel
in interfaceBuildsCleanupExtension
- Returns:
- Maximum bumber of threads that will be invoking
BuildsCleanupExtension.cleanupBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)
method for build package.
-
-