org.camunda.bpm.engine.impl.jobexecutor.historycleanup
Class HistoryCleanupHelper

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

public abstract class HistoryCleanupHelper
extends Object

Author:
Svetlana Dorokhova.

Field Summary
static SimpleDateFormat TIME_FORMAT_WITHOUT_SECONDS_WITH_TIMEZONE
           
 
Constructor Summary
HistoryCleanupHelper()
           
 
Method Summary
static Date getBatchWindowEndTime(CommandContext commandContext)
           
static Date getBatchWindowStartTime(CommandContext commandContext)
           
static HistoryCleanupBatch getNextBatch(CommandContext commandContext)
          Creates next batch object for history cleanup.
static Date getNextRunWithinBatchWindow(Date date, CommandContext commandContext)
           
static Date getNextRunWithinBatchWindow(Date date, Date batchWindowStartTime)
           
static boolean isBatchWindowConfigured(CommandContext commandContext)
           
static boolean isWithinBatchWindow(Date date, CommandContext commandContext)
          Checks if given date is within a batch window.
static Date parseTimeConfiguration(String time)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TIME_FORMAT_WITHOUT_SECONDS_WITH_TIMEZONE

public static final SimpleDateFormat TIME_FORMAT_WITHOUT_SECONDS_WITH_TIMEZONE
Constructor Detail

HistoryCleanupHelper

public HistoryCleanupHelper()
Method Detail

getNextRunWithinBatchWindow

public static Date getNextRunWithinBatchWindow(Date date,
                                               CommandContext commandContext)

getNextRunWithinBatchWindow

public static Date getNextRunWithinBatchWindow(Date date,
                                               Date batchWindowStartTime)

getBatchWindowStartTime

public static Date getBatchWindowStartTime(CommandContext commandContext)

getBatchWindowEndTime

public static Date getBatchWindowEndTime(CommandContext commandContext)

isBatchWindowConfigured

public static boolean isBatchWindowConfigured(CommandContext commandContext)

isWithinBatchWindow

public static boolean isWithinBatchWindow(Date date,
                                          CommandContext commandContext)
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

getNextBatch

public static HistoryCleanupBatch getNextBatch(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.

Parameters:
commandContext -
Returns:


Copyright © 2017 camunda services GmbH. All rights reserved.