Class DefaultHistoryRemovalTimeProvider
- java.lang.Object
-
- org.camunda.bpm.engine.impl.history.DefaultHistoryRemovalTimeProvider
-
- All Implemented Interfaces:
HistoryRemovalTimeProvider
public class DefaultHistoryRemovalTimeProvider extends java.lang.Object implements HistoryRemovalTimeProvider
- Author:
- Tassilo Weidner
-
-
Constructor Summary
Constructors Constructor Description DefaultHistoryRemovalTimeProvider()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.DatecalculateRemovalTime(HistoricBatchEntity historicBatch)Calculates the removal time of historic batches.java.util.DatecalculateRemovalTime(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition)Calculates the removal time of historic entities related to decisions.java.util.DatecalculateRemovalTime(HistoricProcessInstanceEventEntity historicRootProcessInstance, ProcessDefinition processDefinition)Calculates the removal time of historic entities related to processes.static java.util.DatedetermineRemovalTime(java.util.Date initTime, java.lang.Integer timeToLive)protected java.lang.IntegergetTTLByBatchOperation(java.lang.String batchOperation)protected booleanisBatchEnded(HistoricBatchEntity historicBatch)protected booleanisBatchRunning(HistoricBatchEntity historicBatch)protected booleanisProcessInstanceEnded(HistoricProcessInstanceEventEntity historicProcessInstance)protected booleanisProcessInstanceRunning(HistoricProcessInstanceEventEntity historicProcessInstance)
-
-
-
Method Detail
-
calculateRemovalTime
public java.util.Date calculateRemovalTime(HistoricProcessInstanceEventEntity historicRootProcessInstance, ProcessDefinition processDefinition)
Description copied from interface:HistoryRemovalTimeProviderCalculates the removal time of historic entities related to processes. START: the removal time is set for each historic entity separately on occurrence (creation).HistoricScopeInstanceEvent.getEndTime()isnullEND: the removal time is updated simultaneously for all historic entities which belong to the root process instance when it ends.HistoricScopeInstanceEvent.getEndTime()is notnull- Specified by:
calculateRemovalTimein interfaceHistoryRemovalTimeProvider- Parameters:
historicRootProcessInstance- which is either in state running or endedprocessDefinition- of the historic root process instance- Returns:
- the removal time for historic process instances
-
calculateRemovalTime
public java.util.Date calculateRemovalTime(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition)
Description copied from interface:HistoryRemovalTimeProviderCalculates the removal time of historic entities related to decisions.- Specified by:
calculateRemovalTimein interfaceHistoryRemovalTimeProviderdecisionDefinition- of the historic root decision instance- Returns:
- the removal time for historic decision instances
-
calculateRemovalTime
public java.util.Date calculateRemovalTime(HistoricBatchEntity historicBatch)
Description copied from interface:HistoryRemovalTimeProviderCalculates the removal time of historic batches. START: the removal time is set for the historic batch entity on start.HistoricBatchEntity.getEndTime()isnullEND: the removal time is set for the historic batch entity on end.HistoricBatchEntity.getEndTime()is notnull- Specified by:
calculateRemovalTimein interfaceHistoryRemovalTimeProvider- Parameters:
historicBatch- which is either in state running or ended- Returns:
- the removal time of historic entities
-
isBatchRunning
protected boolean isBatchRunning(HistoricBatchEntity historicBatch)
-
isBatchEnded
protected boolean isBatchEnded(HistoricBatchEntity historicBatch)
-
getTTLByBatchOperation
protected java.lang.Integer getTTLByBatchOperation(java.lang.String batchOperation)
-
isProcessInstanceRunning
protected boolean isProcessInstanceRunning(HistoricProcessInstanceEventEntity historicProcessInstance)
-
isProcessInstanceEnded
protected boolean isProcessInstanceEnded(HistoricProcessInstanceEventEntity historicProcessInstance)
-
determineRemovalTime
public static java.util.Date determineRemovalTime(java.util.Date initTime, java.lang.Integer timeToLive)
-
-