Class HistoryCleanupHelper

java.lang.Object
org.camunda.bpm.engine.impl.jobexecutor.historycleanup.HistoryCleanupHelper

public abstract class HistoryCleanupHelper extends Object
Author:
Svetlana Dorokhova.
  • 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

      public static boolean isWithinBatchWindow(Date date, ProcessEngineConfigurationImpl configuration)
      Checks if given date is within a batch window. Batch window start time is checked inclusively.
      Parameters:
      date -
      Returns:
    • parseTimeConfiguration

      public static Date parseTimeConfiguration(String time) throws ParseException
      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

      public static boolean isBatchWindowConfigured(CommandContext commandContext)