Class DefaultHistoryRemovalTimeProvider
- java.lang.Object
-
- org.camunda.bpm.engine.impl.history.DefaultHistoryRemovalTimeProvider
-
- All Implemented Interfaces:
HistoryRemovalTimeProvider
public class DefaultHistoryRemovalTimeProvider extends 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 Date
calculateRemovalTime(HistoricBatchEntity historicBatch)
Calculates the removal time of historic batches.Date
calculateRemovalTime(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition)
Calculates the removal time of historic entities related to decisions.Date
calculateRemovalTime(HistoricProcessInstanceEventEntity historicRootProcessInstance, ProcessDefinition processDefinition)
Calculates the removal time of historic entities related to processes.static Date
determineRemovalTime(Date initTime, Integer timeToLive)
protected Integer
getTTLByBatchOperation(String batchOperation)
protected boolean
isBatchEnded(HistoricBatchEntity historicBatch)
protected boolean
isBatchRunning(HistoricBatchEntity historicBatch)
protected boolean
isProcessInstanceEnded(HistoricProcessInstanceEventEntity historicProcessInstance)
protected boolean
isProcessInstanceRunning(HistoricProcessInstanceEventEntity historicProcessInstance)
-
-
-
Method Detail
-
calculateRemovalTime
public Date calculateRemovalTime(HistoricProcessInstanceEventEntity historicRootProcessInstance, ProcessDefinition processDefinition)
Description copied from interface:HistoryRemovalTimeProvider
Calculates 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()
isnull
END: 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:
calculateRemovalTime
in 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 Date calculateRemovalTime(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition)
Description copied from interface:HistoryRemovalTimeProvider
Calculates the removal time of historic entities related to decisions.- Specified by:
calculateRemovalTime
in interfaceHistoryRemovalTimeProvider
decisionDefinition
- of the historic root decision instance- Returns:
- the removal time for historic decision instances
-
calculateRemovalTime
public Date calculateRemovalTime(HistoricBatchEntity historicBatch)
Description copied from interface:HistoryRemovalTimeProvider
Calculates the removal time of historic batches. START: the removal time is set for the historic batch entity on start.HistoricBatchEntity.getEndTime()
isnull
END: the removal time is set for the historic batch entity on end.HistoricBatchEntity.getEndTime()
is notnull
- Specified by:
calculateRemovalTime
in 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)
-
isProcessInstanceRunning
protected boolean isProcessInstanceRunning(HistoricProcessInstanceEventEntity historicProcessInstance)
-
isProcessInstanceEnded
protected boolean isProcessInstanceEnded(HistoricProcessInstanceEventEntity historicProcessInstance)
-
-