org.camunda.bpm.engine.impl.jobexecutor.historycleanup
Class HistoryCleanupHelper
java.lang.Object
org.camunda.bpm.engine.impl.jobexecutor.historycleanup.HistoryCleanupHelper
public abstract class HistoryCleanupHelper
- extends Object
- Author:
- Svetlana Dorokhova.
|
Method Summary |
static Date |
addDays(Date date,
int amount)
|
static Date |
getBatchWindowEndTime(CommandContext commandContext)
|
static Date |
getBatchWindowStartTime(CommandContext commandContext)
|
static Date |
getCurrentOrNextBatchWindowStartTime(Date date,
Date startTime,
Date endTime)
|
static Date |
getCurrentOrNextRunWithinBatchWindow(Date date,
CommandContext commandContext)
|
static HistoryCleanupBatch |
getNextBatch(CommandContext commandContext)
Creates next batch object for history cleanup. |
static Date |
getNextBatchWindowEndTime(Date date,
Date endTime)
Returns next batch window end time |
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 boolean |
isWithinBatchWindow(Date date,
Date batchWindowStartTime,
Date batchWindowEndTime)
|
static Date |
parseTimeConfiguration(String time)
|
static Date |
updateTime(Date now,
Date newTime)
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TIME_FORMAT_WITHOUT_SECONDS_WITH_TIMEZONE
public static final SimpleDateFormat TIME_FORMAT_WITHOUT_SECONDS_WITH_TIMEZONE
DATE_FORMAT_WITHOUT_TIME
public static final SimpleDateFormat DATE_FORMAT_WITHOUT_TIME
HistoryCleanupHelper
public HistoryCleanupHelper()
getCurrentOrNextRunWithinBatchWindow
public static Date getCurrentOrNextRunWithinBatchWindow(Date date,
CommandContext commandContext)
getNextRunWithinBatchWindow
public static Date getNextRunWithinBatchWindow(Date date,
CommandContext commandContext)
getNextRunWithinBatchWindow
public static Date getNextRunWithinBatchWindow(Date date,
Date batchWindowStartTime)
getCurrentOrNextBatchWindowStartTime
public static Date getCurrentOrNextBatchWindowStartTime(Date date,
Date startTime,
Date endTime)
getNextBatchWindowEndTime
public static Date getNextBatchWindowEndTime(Date date,
Date endTime)
- Returns next batch window end time
- Parameters:
date - current dateendTime -
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:
isWithinBatchWindow
public static boolean isWithinBatchWindow(Date date,
Date batchWindowStartTime,
Date batchWindowEndTime)
updateTime
public static Date updateTime(Date now,
Date newTime)
addDays
public static Date addDays(Date date,
int amount)
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. 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 -
- Returns:
Copyright © 2017 camunda services GmbH. All rights reserved.