Class FileCleanAdapter
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.FileCleanAdapter
-
- All Implemented Interfaces:
EventListener
,FileCleanListener
- Direct Known Subclasses:
DiskUsageCleanupListener
public class FileCleanAdapter extends Object implements FileCleanListener
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface jetbrains.buildServer.serverSide.impl.cleanup.FileCleanListener
FileCleanListener.PerFileCleanListener
-
-
Constructor Summary
Constructors Constructor Description FileCleanAdapter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
beforeDirectoryCleaned(File dir, SBuildType supposedBuildType, EventDispatcher<FileCleanListener.PerFileCleanListener> eventDispatcher)
Called before a directory is removed.void
buildFilesCleaned(File dir, SBuild build, long cleanedArtifactsSize, long cleanedInternalArtifactsSize, long cleanedLogsSize, boolean noArtifactsLeft, String storageId)
Called when artifacts are cleaned from a build (partial cleanup).void
buildFilesCleanedOnBuiltInStorage(File dir, SBuild build, long cleanedArtifactsSize, long cleanedInternalArtifactsSize, long cleanedLogsSize, boolean noArtifactsLeft)
Called when artifacts are cleaned from a build (partial cleanup).
-
-
-
Method Detail
-
buildFilesCleanedOnBuiltInStorage
public void buildFilesCleanedOnBuiltInStorage(@NotNull File dir, @NotNull SBuild build, long cleanedArtifactsSize, long cleanedInternalArtifactsSize, long cleanedLogsSize, boolean noArtifactsLeft)
Description copied from interface:FileCleanListener
Called when artifacts are cleaned from a build (partial cleanup). This method is originated only for reports of built-in storages being cleaned. The particular storage id will be obtained automatically from the build. As a more general method, which expects specifing storage id, seeFileCleanListener.buildFilesCleaned(File, SBuild, long, long, long, boolean, String)
.- Specified by:
buildFilesCleanedOnBuiltInStorage
in interfaceFileCleanListener
- Parameters:
dir
- Build artifacts directory.build
- Build associated with this directory (still in history)cleanedArtifactsSize
- Size of build artifacts cleanedcleanedInternalArtifactsSize
- Size of internal artifacts cleaned. Doesn't contain cleaned log size.cleanedLogsSize
- Size of build logs cleaned.noArtifactsLeft
- Should be true if no artifacts left (internal artifacts don't matter)
-
buildFilesCleaned
public void buildFilesCleaned(@NotNull File dir, @NotNull SBuild build, long cleanedArtifactsSize, long cleanedInternalArtifactsSize, long cleanedLogsSize, boolean noArtifactsLeft, @NotNull String storageId)
Description copied from interface:FileCleanListener
Called when artifacts are cleaned from a build (partial cleanup).- Specified by:
buildFilesCleaned
in interfaceFileCleanListener
- Parameters:
dir
- Build artifacts directory.build
- Build associated with this directory (still in history)cleanedArtifactsSize
- Size of build artifacts cleanedcleanedInternalArtifactsSize
- Size of internal artifacts cleaned. Doesn't contain cleaned log size.cleanedLogsSize
- Size of build logs cleaned.noArtifactsLeft
- Should be true if no artifacts left (internal artifacts don't matter)storageId
- Id of the storage, where artifacts where removed
-
beforeDirectoryCleaned
public void beforeDirectoryCleaned(@NotNull File dir, @Nullable SBuildType supposedBuildType, EventDispatcher<FileCleanListener.PerFileCleanListener> eventDispatcher)
Description copied from interface:FileCleanListener
Called before a directory is removed. AFileCleanListener.PerFileCleanListener
could be attached to the eventDispatcher to watch each file removal. The dispatched is created for each directory removed and destroyed afterwards.- Specified by:
beforeDirectoryCleaned
in interfaceFileCleanListener
-
-