Class HistoryCleanupHelper
java.lang.Object
org.camunda.bpm.engine.impl.jobexecutor.historycleanup.HistoryCleanupHelper
- Author:
- Svetlana Dorokhova.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic int
Returns the max retries used for cleanup jobs.static boolean
isBatchWindowConfigured
(CommandContext commandContext) static boolean
isWithinBatchWindow
(Date date, ProcessEngineConfigurationImpl configuration) Checks if given date is within a batch window.static int[][]
listMinuteChunks
(int numberOfChunks) static Date
parseTimeConfiguration
(String time) static void
prepareNextBatch
(HistoryCleanupBatch historyCleanupBatch, CommandContext commandContext) Creates next batch object for history cleanup.
-
Constructor Details
-
HistoryCleanupHelper
public HistoryCleanupHelper()
-
-
Method Details
-
getMaxRetries
public static int getMaxRetries()Returns the max retries used for cleanup jobs. If the configuration is null, the default value used will be defaultNumberOfRetries, the configuration used for all jobs.- Returns:
- the effective max number of retries
-
isWithinBatchWindow
Checks if given date is within a batch window. Batch window start time is checked inclusively.- Parameters:
date
-- Returns:
-
parseTimeConfiguration
- Throws:
ParseException
-
prepareNextBatch
public static void prepareNextBatch(HistoryCleanupBatch historyCleanupBatch, CommandContext commandContext) Creates next batch object for history cleanup. First searches for historic process instances ready for cleanup. If there is still some place left in batch (configured batch size was not reached), searches for historic decision instances and also adds them to the batch. Then if there is still some place left in batch, searches for historic case instances and historic batches - and adds them to the batch.- Parameters:
commandContext
-
-
listMinuteChunks
public static int[][] listMinuteChunks(int numberOfChunks) -
isBatchWindowConfigured
-