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 voidcleanupBuildsData(BuildCleanupContext context)Invoked afterBuildsCleanupExtension.prepareBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)is called for all extensions.intgetCleanupBuildsDataConcurrencyLevel()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.StringgetDisplayName()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:BuildsCleanupExtensionReturns the extension name to display in the UI.- Specified by:
 getDisplayNamein interfaceBuildsCleanupExtension
 
- 
cleanupBuildsData
public void cleanupBuildsData(@NotNull BuildCleanupContext context) throws IOException, CleanupInterruptedExceptionDescription copied from interface:BuildsCleanupExtensionInvoked 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:
 cleanupBuildsDatain interfaceBuildsCleanupExtension- Parameters:
 context- cleanup context- Throws:
 CleanupInterruptedException- if the cleanup process was interruptedIOException
 
- 
getCleanupBuildsDataConcurrencyLevel
public int getCleanupBuildsDataConcurrencyLevel()
Description copied from interface:BuildsCleanupExtensionThis 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:
 getCleanupBuildsDataConcurrencyLevelin interfaceBuildsCleanupExtension- Returns:
 - Maximum bumber of threads that will be invoking 
BuildsCleanupExtension.cleanupBuildsData(jetbrains.buildServer.serverSide.cleanup.BuildCleanupContext)method for build package. 
 
 - 
 
 -