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 String
TEAMCITY_DIAGNOSTICS_MAX_DAYS_TO_KEEP
static String
TEAMCITY_DIAGNOSTICS_NUM_DUMPS_TO_KEEP
static String
TEAMCITY_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 void
afterCleanup(CleanupProcessState cleanupState)
Invoked upon finishing of the main cleanup process.String
getDescription()
int
getNumberOfFilesToKeep()
File is cleaned if any of maxFiles or maxDays conditions matchint
getNumberOfHoursToKeep()
-
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:RequestDiagnosticsCleanerBase
File is cleaned if any of maxFiles or maxDays conditions match- Specified by:
getNumberOfFilesToKeep
in classRequestDiagnosticsCleanerBase
-
getNumberOfHoursToKeep
public int getNumberOfHoursToKeep()
- Specified by:
getNumberOfHoursToKeep
in classRequestDiagnosticsCleanerBase
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceRequestDiagnosticsCleaner
- Specified by:
getDescription
in classRequestDiagnosticsCleanerBase
-
afterCleanup
public void afterCleanup(@NotNull CleanupProcessState cleanupState)
Description copied from interface:AfterBuildsCleanupExtension
Invoked 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:
afterCleanup
in interfaceAfterBuildsCleanupExtension
- Parameters:
cleanupState
- cleanup process state
-
-