Package jetbrains.buildServer.diagnostic
Class ThreadDumpsCleaner
- java.lang.Object
-
- jetbrains.buildServer.diagnostic.RequestDiagnosticsCleanerBase
-
- jetbrains.buildServer.diagnostic.ThreadDumpsCleaner
-
- All Implemented Interfaces:
RequestDiagnosticsCleaner,AfterBuildsCleanupExtension,ServerExtension,TeamCityExtension
public class ThreadDumpsCleaner extends RequestDiagnosticsCleanerBase implements AfterBuildsCleanupExtension
-
-
Field Summary
Fields Modifier and Type Field Description static StringTEAMCITY_DIAGNOSTICS_MAX_DAYS_TO_KEEPstatic StringTEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEPstatic StringTEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP_LEGACY
-
Constructor Summary
Constructors Constructor Description ThreadDumpsCleaner(ExecutorService executor, AutoThreadDumpConfig threadDumpConfig)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterCleanup(CleanupProcessState cleanupState)Invoked upon finishing of the main cleanup process.StringgetDescription()intgetNumberOfFilesToKeep()File is cleaned if any of maxFiles or maxDays conditions matchintgetNumberOfHoursToKeep()-
Methods inherited from class jetbrains.buildServer.diagnostic.RequestDiagnosticsCleanerBase
cleanup, scheduleCleanup
-
-
-
-
Field Detail
-
TEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP_LEGACY
public static final String TEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP_LEGACY
- See Also:
- Constant Field Values
-
TEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP
public static final String TEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP
- See Also:
- Constant Field Values
-
TEAMCITY_DIAGNOSTICS_MAX_DAYS_TO_KEEP
public static final String TEAMCITY_DIAGNOSTICS_MAX_DAYS_TO_KEEP
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ThreadDumpsCleaner
public ThreadDumpsCleaner(@NotNull ExecutorService executor, @NotNull AutoThreadDumpConfig threadDumpConfig)
-
-
Method Detail
-
getNumberOfFilesToKeep
public int getNumberOfFilesToKeep()
Description copied from class:RequestDiagnosticsCleanerBaseFile is cleaned if any of maxFiles or maxDays conditions match- Specified by:
getNumberOfFilesToKeepin classRequestDiagnosticsCleanerBase
-
getNumberOfHoursToKeep
public int getNumberOfHoursToKeep()
- Specified by:
getNumberOfHoursToKeepin classRequestDiagnosticsCleanerBase
-
getDescription
public String getDescription()
- Specified by:
getDescriptionin interfaceRequestDiagnosticsCleaner- Specified by:
getDescriptionin classRequestDiagnosticsCleanerBase
-
afterCleanup
public void afterCleanup(@NotNull CleanupProcessState cleanupState)Description copied from interface:AfterBuildsCleanupExtensionInvoked upon finishing of the main cleanup process. At this point all data for specific builds is deleted.
Note: This extension might not be called for every cleanup run as cleanup process can be interrupted earlier. Extension must check cleanup process state and if it is interrupted, complete its operations and return as quick as possible.- Specified by:
afterCleanupin interfaceAfterBuildsCleanupExtension- Parameters:
cleanupState- cleanup process state
-
-