Class CleanupHistoryImpl
- java.lang.Object
-
- jetbrains.buildServer.serverSide.impl.cleanup.history.CleanupHistoryImpl
-
- All Implemented Interfaces:
CleanupHistory,CleanupHistoryManager
public class CleanupHistoryImpl extends Object implements CleanupHistoryManager
-
-
Constructor Summary
Constructors Constructor Description CleanupHistoryImpl(SQLRunnerEx sqlRunner, NumericIdSequences idSequences, CleanupHistoryRecordFactory factory, ServerMetrics serverMetrics)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcleanupFinished(Date finishTime, InterruptReason interrupt_reason)Closes last cleanup history record with finish timevoidcleanupStarted(Date startTime)Opens new cleanup history record with given start timeList<CleanupHistoryRecord>getCleanupHistory()The entire cleanup history.CleanupHistoryRecordgetLastCleanupResult()The last recorded cleanup result.CleanupHistoryRecordgetLastFinishedCleanupResult()The last finished recorded cleanup result, i.e.CleanupHistoryRecordgetPreviousCleanupResult()The second recorded cleanup result.
-
-
-
Constructor Detail
-
CleanupHistoryImpl
public CleanupHistoryImpl(@NotNull SQLRunnerEx sqlRunner, @NotNull NumericIdSequences idSequences, @NotNull CleanupHistoryRecordFactory factory, @NotNull ServerMetrics serverMetrics)
-
-
Method Detail
-
cleanupStarted
public void cleanupStarted(@NotNull Date startTime)Description copied from interface:CleanupHistoryManagerOpens new cleanup history record with given start time- Specified by:
cleanupStartedin interfaceCleanupHistoryManager- Parameters:
startTime- start time of the cleanup
-
cleanupFinished
public void cleanupFinished(@NotNull Date finishTime, @Nullable InterruptReason interrupt_reason)Description copied from interface:CleanupHistoryManagerCloses last cleanup history record with finish time- Specified by:
cleanupFinishedin interfaceCleanupHistoryManager- Parameters:
finishTime- time of cleanup finishinterrupt_reason- reason of cleanup finish. Must be null to indicate that cleanup was finished correctly
-
getCleanupHistory
@NotNull public List<CleanupHistoryRecord> getCleanupHistory()
Description copied from interface:CleanupHistoryThe entire cleanup history.- Specified by:
getCleanupHistoryin interfaceCleanupHistory- Returns:
- collection of cleanup history records
-
getLastCleanupResult
@Nullable public CleanupHistoryRecord getLastCleanupResult()
Description copied from interface:CleanupHistoryThe last recorded cleanup result.- Specified by:
getLastCleanupResultin interfaceCleanupHistory- Returns:
- last cleanup result in history if there is one,
nullotherwise
-
getPreviousCleanupResult
@Nullable public CleanupHistoryRecord getPreviousCleanupResult()
Description copied from interface:CleanupHistoryThe second recorded cleanup result.- Specified by:
getPreviousCleanupResultin interfaceCleanupHistory- Returns:
- previous cleanup result in history if there is one,
nullotherwise
-
getLastFinishedCleanupResult
@Nullable public CleanupHistoryRecord getLastFinishedCleanupResult()
Description copied from interface:CleanupHistoryThe last finished recorded cleanup result, i.e. the most recent record with 'finished time'.- Specified by:
getLastFinishedCleanupResultin interfaceCleanupHistory
-
-