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 void
cleanupFinished(Date finishTime, InterruptReason interrupt_reason)
Closes last cleanup history record with finish timevoid
cleanupStarted(Date startTime)
Opens new cleanup history record with given start timeList<CleanupHistoryRecord>
getCleanupHistory()
The entire cleanup history.CleanupHistoryRecord
getLastCleanupResult()
The last recorded cleanup result.CleanupHistoryRecord
getLastFinishedCleanupResult()
The last finished recorded cleanup result, i.e.CleanupHistoryRecord
getPreviousCleanupResult()
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:CleanupHistoryManager
Opens new cleanup history record with given start time- Specified by:
cleanupStarted
in interfaceCleanupHistoryManager
- Parameters:
startTime
- start time of the cleanup
-
cleanupFinished
public void cleanupFinished(@NotNull Date finishTime, @Nullable InterruptReason interrupt_reason)
Description copied from interface:CleanupHistoryManager
Closes last cleanup history record with finish time- Specified by:
cleanupFinished
in 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:CleanupHistory
The entire cleanup history.- Specified by:
getCleanupHistory
in interfaceCleanupHistory
- Returns:
- collection of cleanup history records
-
getLastCleanupResult
@Nullable public CleanupHistoryRecord getLastCleanupResult()
Description copied from interface:CleanupHistory
The last recorded cleanup result.- Specified by:
getLastCleanupResult
in interfaceCleanupHistory
- Returns:
- last cleanup result in history if there is one,
null
otherwise
-
getPreviousCleanupResult
@Nullable public CleanupHistoryRecord getPreviousCleanupResult()
Description copied from interface:CleanupHistory
The second recorded cleanup result.- Specified by:
getPreviousCleanupResult
in interfaceCleanupHistory
- Returns:
- previous cleanup result in history if there is one,
null
otherwise
-
getLastFinishedCleanupResult
@Nullable public CleanupHistoryRecord getLastFinishedCleanupResult()
Description copied from interface:CleanupHistory
The last finished recorded cleanup result, i.e. the most recent record with 'finished time'.- Specified by:
getLastFinishedCleanupResult
in interfaceCleanupHistory
-
-