Class SetJobRetriesBuilderImpl
- java.lang.Object
-
- org.camunda.bpm.engine.impl.management.SetJobRetriesBuilderImpl
-
- All Implemented Interfaces:
SetJobRetriesBuilder
public class SetJobRetriesBuilderImpl extends java.lang.Object implements SetJobRetriesBuilder
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandExecutor
commandExecutor
protected java.util.Date
dueDate
protected boolean
isDueDateSet
protected java.lang.String
jobDefinitionId
protected java.lang.String
jobId
protected java.util.List<java.lang.String>
jobIds
protected static CommandLogger
LOG
protected java.lang.Integer
retries
-
Constructor Summary
Constructors Constructor Description SetJobRetriesBuilderImpl(CommandExecutor commandExecutor, int retries)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SetJobRetriesBuilder
dueDate(java.util.Date dueDate)
Specifies a due date to be set on the referencedjobs
.void
execute()
Closes the fluent builder and executes the instructions.SetJobRetriesBuilder
jobDefinitionId(java.lang.String jobDefinitionId)
Specifies aJob
definition id for the set retries action.SetJobRetriesBuilder
jobId(java.lang.String jobId)
Specifies a singleJob
by it's ID for the set retries action.SetJobRetriesBuilder
jobIds(java.util.List<java.lang.String> jobIds)
Specifies a list ofjobs
by their IDs for the set retries action.protected void
validateParameters()
-
-
-
Field Detail
-
LOG
protected static final CommandLogger LOG
-
commandExecutor
protected final CommandExecutor commandExecutor
-
jobId
protected java.lang.String jobId
-
jobIds
protected java.util.List<java.lang.String> jobIds
-
jobDefinitionId
protected java.lang.String jobDefinitionId
-
retries
protected java.lang.Integer retries
-
dueDate
protected java.util.Date dueDate
-
isDueDateSet
protected boolean isDueDateSet
-
-
Constructor Detail
-
SetJobRetriesBuilderImpl
public SetJobRetriesBuilderImpl(CommandExecutor commandExecutor, int retries)
-
-
Method Detail
-
jobId
public SetJobRetriesBuilder jobId(java.lang.String jobId)
Description copied from interface:SetJobRetriesBuilder
Specifies a singleJob
by it's ID for the set retries action. Note: Only one method of referencing jobs is allowed. If you use jobId, you can not use jobIds or jobDefinitionId.- Specified by:
jobId
in interfaceSetJobRetriesBuilder
- Parameters:
jobId
- the Id of the job. Must not be null or empty ("").- Returns:
- the builder instance
- See Also:
ManagementService.setJobRetries(String, int)
-
jobIds
public SetJobRetriesBuilder jobIds(java.util.List<java.lang.String> jobIds)
Description copied from interface:SetJobRetriesBuilder
Specifies a list ofjobs
by their IDs for the set retries action. Note: Only one method of referencing jobs is allowed. If you use jobIds, you can not use jobId or jobDefinitionId.- Specified by:
jobIds
in interfaceSetJobRetriesBuilder
- Parameters:
jobIds
- the list of job ids. Must not be null or empty and only contain valid job ids.- Returns:
- the builder instance
- See Also:
ManagementService.setJobRetries(List, int)
-
jobDefinitionId
public SetJobRetriesBuilder jobDefinitionId(java.lang.String jobDefinitionId)
Description copied from interface:SetJobRetriesBuilder
Specifies aJob
definition id for the set retries action. All failedjobs
with that definition id will be updated. Note: Only one method of referencing jobs is allowed. If you use jobDefinitionId, you can not use jobId or jobId.- Specified by:
jobDefinitionId
in interfaceSetJobRetriesBuilder
- Parameters:
jobDefinitionId
- the job definition id. Must not be null or empty ("").- Returns:
- the builder instance
- See Also:
ManagementService.setJobRetriesByJobDefinitionId(String, int)
-
dueDate
public SetJobRetriesBuilder dueDate(java.util.Date dueDate)
Description copied from interface:SetJobRetriesBuilder
Specifies a due date to be set on the referencedjobs
. When the number of retries of a job are incremented it is not automatically scheduled for immediate execution. When aJob
is executed is determined by the due date. By setting the due date together with the job retries, the scheduled execution date of the job can be adjusted.- Specified by:
dueDate
in interfaceSetJobRetriesBuilder
- Parameters:
dueDate
- The new due date for the updated jobs. If it is null, the due date will be set to null. IfensureJobDueDateNotNull
is true, the due date will be set to the current date instead of null.- Returns:
- the builder instance
-
execute
public void execute()
Description copied from interface:SetJobRetriesBuilder
Closes the fluent builder and executes the instructions.- Specified by:
execute
in interfaceSetJobRetriesBuilder
-
validateParameters
protected void validateParameters()
-
-