Class SetRemovalTimeToHistoricProcessInstancesBuilderImpl
java.lang.Object
org.camunda.bpm.engine.impl.history.SetRemovalTimeToHistoricProcessInstancesBuilderImpl
- All Implemented Interfaces:
SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
,SetRemovalTimeToHistoricProcessInstancesBuilder
public class SetRemovalTimeToHistoricProcessInstancesBuilderImpl
extends Object
implements SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Author:
- Tassilo Weidner
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic enum
-
Field Summary
Modifier and TypeFieldDescriptionprotected Integer
protected CommandExecutor
protected boolean
protected HistoricProcessInstanceQuery
protected Date
protected boolean
-
Constructor Summary
ConstructorDescriptionSetRemovalTimeToHistoricProcessInstancesBuilderImpl
(CommandExecutor commandExecutor) -
Method Summary
Modifier and TypeMethodDescriptionabsoluteRemovalTime
(Date removalTime) Sets the removal time to an absolute date.Selects historic decision instances by the given ids.Selects historic process instances by the given query.Calculates the removal time dynamically based on the respective process definition time to live and the process engine's removal time strategy.chunkSize
(int chunkSize) Defines the size of the chunks in which removal time updates are processed.Sets the removal time tonull
.Sets the removal time asynchronously as batch.getIds()
getMode()
getQuery()
Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance.boolean
boolean
Handles removal time updates in chunks, taking into account the defined size inremovalTimeUpdateChunkSize
in the process engine configuration.
-
Field Details
-
query
-
ids
-
removalTime
-
mode
-
isHierarchical
protected boolean isHierarchical -
updateInChunks
protected boolean updateInChunks -
chunkSize
-
commandExecutor
-
-
Constructor Details
-
SetRemovalTimeToHistoricProcessInstancesBuilderImpl
-
-
Method Details
-
byQuery
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Selects historic process instances by the given query.- Specified by:
byQuery
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Parameters:
query
- to be evaluated.- Returns:
- the builder.
-
byIds
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Selects historic decision instances by the given ids.- Specified by:
byIds
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Parameters:
ids
- supposed to be affected.- Returns:
- the builder.
-
absoluteRemovalTime
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Sets the removal time to an absolute date.- Specified by:
absoluteRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Parameters:
removalTime
- supposed to be set to historic entities.- Returns:
- the builder.
-
calculatedRemovalTime
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Calculates the removal time dynamically based on the respective process definition time to live and the process engine's removal time strategy.
In case
SetRemovalTimeToHistoricProcessInstancesBuilder.hierarchical()
is enabled, the removal time is being calculated based on the base time and time to live of the historic root process instance.- Specified by:
calculatedRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
clearedRemovalTime
Description copied from interface:SetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
Sets the removal time to
null
.- Specified by:
clearedRemovalTime
in interfaceSetRemovalTimeSelectModeForHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
hierarchical
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Takes additionally those historic process instances into account that are part of the hierarchy of the given historic process instance. If the root process instance id of the given historic process instance isnull
, the hierarchy is ignored. This is the case for instances that were started with a version prior 7.10.- Specified by:
hierarchical
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
updateInChunks
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Handles removal time updates in chunks, taking into account the defined size inremovalTimeUpdateChunkSize
in the process engine configuration. The size of the chunks can also be overridden per call with theSetRemovalTimeToHistoricProcessInstancesBuilder.chunkSize(int)
option. Enabling this option can lead to multiple executions of the resulting jobs, preventing the database transaction from timing out by limiting the number of rows to update.- Specified by:
updateInChunks
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
chunkSize
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Defines the size of the chunks in which removal time updates are processed. The value must be a positive integer value that doesn't exceed theProcessSetRemovalTimeJobHandler.MAX_CHUNK_SIZE
. Only has an effect ifSetRemovalTimeToHistoricProcessInstancesBuilder.updateInChunks()
is invoked as well. If undefined, the operation uses the `removalTimeUpdateChunkSize` defined in the process engine configuration.- Specified by:
chunkSize
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the builder.
-
executeAsync
Description copied from interface:SetRemovalTimeToHistoricProcessInstancesBuilder
Sets the removal time asynchronously as batch. The returned batch can be used to track the progress of setting a removal time.- Specified by:
executeAsync
in interfaceSetRemovalTimeToHistoricProcessInstancesBuilder
- Returns:
- the batch which sets the removal time asynchronously.
-
getQuery
-
getIds
-
getRemovalTime
-
getMode
-
isHierarchical
public boolean isHierarchical() -
isUpdateInChunks
public boolean isUpdateInChunks() -
getChunkSize
-