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.Date
calculateRemovalTime(HistoricBatchEntity historicBatch)
Calculates the removal time of historic batches.java.util.Date
calculateRemovalTime(HistoricDecisionInstanceEntity historicRootDecisionInstance, DecisionDefinition decisionDefinition)
Calculates the removal time of historic entities related to decisions.java.util.Date
calculateRemovalTime(HistoricProcessInstanceEventEntity historicRootProcessInstance, ProcessDefinition processDefinition)
Calculates the removal time of historic entities related to processes.static java.util.Date
determineRemovalTime(java.util.Date initTime, java.lang.Integer timeToLive)
protected java.lang.Integer
getTTLByBatchOperation(java.lang.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 java.util.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 java.util.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 java.util.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)
-
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)
-
-