Class BatchEntity
java.lang.Object
org.camunda.bpm.engine.impl.batch.BatchEntity
- All Implemented Interfaces:
Batch
,DbEntity
,HasDbReferences
,HasDbRevision
,Nameable
- Direct Known Subclasses:
BatchStatisticsEntity
public class BatchEntity
extends Object
implements Batch, DbEntity, HasDbReferences, Nameable, HasDbRevision
-
Field Summary
Modifier and TypeFieldDescriptionstatic final BatchMonitorJobDeclaration
static final BatchSeedJobDeclaration
protected JobDefinitionEntity
protected String
protected BatchJobHandler<?>
protected int
protected ByteArrayField
protected String
protected Date
protected String
protected int
protected int
protected JobDefinitionEntity
protected String
protected int
protected JobDefinitionEntity
protected String
protected Date
protected int
protected String
protected int
protected String
Fields inherited from interface org.camunda.bpm.engine.batch.Batch
TYPE_BATCH_SET_REMOVAL_TIME, TYPE_CORRELATE_MESSAGE, TYPE_DECISION_SET_REMOVAL_TIME, TYPE_HISTORIC_DECISION_INSTANCE_DELETION, TYPE_HISTORIC_PROCESS_INSTANCE_DELETION, TYPE_PROCESS_INSTANCE_DELETION, TYPE_PROCESS_INSTANCE_MIGRATION, TYPE_PROCESS_INSTANCE_MODIFICATION, TYPE_PROCESS_INSTANCE_RESTART, TYPE_PROCESS_INSTANCE_UPDATE_SUSPENSION_STATE, TYPE_PROCESS_SET_REMOVAL_TIME, TYPE_SET_EXTERNAL_TASK_RETRIES, TYPE_SET_JOB_RETRIES, TYPE_SET_VARIABLES
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionprotected Date
createMonitorJob
(boolean setDueDate) createSeedJobDefinition
(String deploymentId) void
delete
(boolean cascadeToHistory, boolean deleteJobs) void
void
protected void
deleteVariables
(CommandContext commandContext) void
void
void
int
byte[]
getId()
int
int
getName()
Returns a representation of the object, as would be stored in the database.Scope: IN-MEMORY referencesScope: IN-MEMORY referencesint
int
int
int
getType()
boolean
boolean
Indicates whether this batch is suspended.void
setBatchJobDefinitionId
(String batchJobDefinitionId) void
setBatchJobsPerSeed
(int batchJobsPerSeed) void
setConfiguration
(String configuration) void
setConfigurationBytes
(byte[] configuration) void
setCreateUserId
(String createUserId) void
setExecutionStartTime
(Date executionStartTime) void
void
setInvocationsPerBatchJob
(int invocationsPerBatchJob) void
setJobsCreated
(int jobsCreated) void
setMonitorJobDefinitionId
(String monitorJobDefinitionId) void
setRevision
(int revision) void
setSeedJobDefinitionId
(String seedJobDefinitionId) void
setStartTime
(Date startTime) void
setSuspensionState
(int state) void
setTenantId
(String tenantId) void
setTotalJobs
(int totalJobs) void
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.camunda.bpm.engine.impl.db.HasDbReferences
getDependentEntities
-
Field Details
-
BATCH_SEED_JOB_DECLARATION
-
BATCH_MONITOR_JOB_DECLARATION
-
id
-
type
-
totalJobs
protected int totalJobs -
jobsCreated
protected int jobsCreated -
batchJobsPerSeed
protected int batchJobsPerSeed -
invocationsPerBatchJob
protected int invocationsPerBatchJob -
seedJobDefinitionId
-
monitorJobDefinitionId
-
batchJobDefinitionId
-
configuration
-
tenantId
-
createUserId
-
suspensionState
protected int suspensionState -
startTime
-
executionStartTime
-
revision
protected int revision -
seedJobDefinition
-
monitorJobDefinition
-
batchJobDefinition
-
batchJobHandler
-
-
Constructor Details
-
BatchEntity
public BatchEntity()
-
-
Method Details
-
getId
-
setId
-
getName
-
getType
-
setType
-
getTotalJobs
public int getTotalJobs()- Specified by:
getTotalJobs
in interfaceBatch
- Returns:
- the number of batch execution jobs required to complete the batch
-
setTotalJobs
public void setTotalJobs(int totalJobs) -
getJobsCreated
public int getJobsCreated()- Specified by:
getJobsCreated
in interfaceBatch
- Returns:
- the number of batch execution jobs already created by the seed job
-
setJobsCreated
public void setJobsCreated(int jobsCreated) -
getBatchJobsPerSeed
public int getBatchJobsPerSeed()- Specified by:
getBatchJobsPerSeed
in interfaceBatch
- Returns:
- number of batch jobs created per batch seed job invocation
-
setBatchJobsPerSeed
public void setBatchJobsPerSeed(int batchJobsPerSeed) -
getInvocationsPerBatchJob
public int getInvocationsPerBatchJob()- Specified by:
getInvocationsPerBatchJob
in interfaceBatch
- Returns:
- the number of invocations executed per batch job
-
setInvocationsPerBatchJob
public void setInvocationsPerBatchJob(int invocationsPerBatchJob) -
getSeedJobDefinitionId
- Specified by:
getSeedJobDefinitionId
in interfaceBatch
- Returns:
- the id of the batch seed job definition
-
setSeedJobDefinitionId
-
getMonitorJobDefinitionId
- Specified by:
getMonitorJobDefinitionId
in interfaceBatch
- Returns:
- the id of the batch monitor job definition
-
setMonitorJobDefinitionId
-
getBatchJobDefinitionId
- Specified by:
getBatchJobDefinitionId
in interfaceBatch
- Returns:
- the id of the batch job definition
-
setBatchJobDefinitionId
-
getTenantId
- Specified by:
getTenantId
in interfaceBatch
- Returns:
- the batch's tenant id or null
-
setTenantId
-
getCreateUserId
- Specified by:
getCreateUserId
in interfaceBatch
- Returns:
- the batch creator's user id
-
setCreateUserId
-
getConfiguration
-
setConfiguration
-
setSuspensionState
public void setSuspensionState(int state) -
getSuspensionState
public int getSuspensionState() -
isSuspended
public boolean isSuspended()Description copied from interface:Batch
Indicates whether this batch is suspended. If a batch is suspended, the batch jobs will not be acquired by the job executor.
Note: It is still possible to manually suspend and activate jobs and job definitions using the
ManagementService
, which will not change the suspension state of the batch.- Specified by:
isSuspended
in interfaceBatch
- Returns:
- true if this batch is currently suspended, false otherwise
- See Also:
-
getStartTime
- Specified by:
getStartTime
in interfaceBatch
- Returns:
- the date the batch was started
-
setStartTime
-
getExecutionStartTime
- Specified by:
getExecutionStartTime
in interfaceBatch
- Returns:
- the date the batch execution started
-
setExecutionStartTime
-
setRevision
public void setRevision(int revision) - Specified by:
setRevision
in interfaceHasDbRevision
-
getRevision
public int getRevision()- Specified by:
getRevision
in interfaceHasDbRevision
-
getRevisionNext
public int getRevisionNext()- Specified by:
getRevisionNext
in interfaceHasDbRevision
-
getSeedJobDefinition
-
getMonitorJobDefinition
-
getBatchJobDefinition
-
getConfigurationBytes
public byte[] getConfigurationBytes() -
setConfigurationBytes
public void setConfigurationBytes(byte[] configuration) -
getBatchJobHandler
-
getPersistentState
Description copied from interface:DbEntity
Returns a representation of the object, as would be stored in the database. Used when deciding if updates have occurred to the object or not since it was last loaded.- Specified by:
getPersistentState
in interfaceDbEntity
-
createSeedJobDefinition
-
createMonitorJobDefinition
-
createBatchJobDefinition
-
createSeedJob
-
deleteSeedJob
public void deleteSeedJob() -
createMonitorJob
-
calculateMonitorJobDueDate
-
deleteMonitorJob
public void deleteMonitorJob() -
delete
public void delete(boolean cascadeToHistory, boolean deleteJobs) -
deleteVariables
-
fireHistoricStartEvent
public void fireHistoricStartEvent() -
fireHistoricEndEvent
public void fireHistoricEndEvent() -
fireHistoricUpdateEvent
public void fireHistoricUpdateEvent() -
isCompleted
public boolean isCompleted() -
toString
-
getReferencedEntityIds
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntityIds
in interfaceHasDbReferences
- Returns:
- the ids of the entities that this entity references. Should only return ids for entities of the same type
-
getReferencedEntitiesIdAndClass
Description copied from interface:HasDbReferences
Scope: IN-MEMORY references
- Specified by:
getReferencedEntitiesIdAndClass
in interfaceHasDbReferences
- Returns:
- a map of the ids and the entities' classes that this entity references. It's used when trying to determine if there was an Optimistic Locking occurrence on an INSERT or UPDATE of an object of this type.
-