Class DefaultHistoryRemovalTimeProvider
java.lang.Object
org.camunda.bpm.engine.impl.history.DefaultHistoryRemovalTimeProvider
- All Implemented Interfaces:
HistoryRemovalTimeProvider
- Author:
- Tassilo Weidner
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncalculateRemovalTime
(HistoricBatchEntity historicBatch) Calculates the removal time of historic batches.calculateRemovalTime
(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition) Calculates the removal time of historic entities related to decisions.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)
-
Constructor Details
-
DefaultHistoryRemovalTimeProvider
public DefaultHistoryRemovalTimeProvider()
-
-
Method Details
-
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
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
-
isBatchEnded
-
getTTLByBatchOperation
-
isProcessInstanceRunning
protected boolean isProcessInstanceRunning(HistoricProcessInstanceEventEntity historicProcessInstance) -
isProcessInstanceEnded
protected boolean isProcessInstanceEnded(HistoricProcessInstanceEventEntity historicProcessInstance) -
determineRemovalTime
-