org.camunda.bpm.engine.impl.batch
Class BatchEntity

java.lang.Object
  extended by org.camunda.bpm.engine.impl.batch.BatchEntity
All Implemented Interfaces:
Batch, DbEntity, HasDbRevision, Nameable
Direct Known Subclasses:
BatchStatisticsEntity

public class BatchEntity
extends Object
implements Batch, DbEntity, Nameable, HasDbRevision


Field Summary
static BatchMonitorJobDeclaration BATCH_MONITOR_JOB_DECLARATION
           
static BatchSeedJobDeclaration BATCH_SEED_JOB_DECLARATION
           
protected  JobDefinitionEntity batchJobDefinition
           
protected  String batchJobDefinitionId
           
protected  BatchJobHandler<?> batchJobHandler
           
protected  int batchJobsPerSeed
           
protected  ByteArrayField configuration
           
protected  String id
           
protected  int invocationsPerBatchJob
           
protected  int jobsCreated
           
protected  JobDefinitionEntity monitorJobDefinition
           
protected  String monitorJobDefinitionId
           
protected  int revision
           
protected  JobDefinitionEntity seedJobDefinition
           
protected  String seedJobDefinitionId
           
protected  int suspensionState
           
protected  String tenantId
           
protected  int totalJobs
           
protected  String type
           
 
Fields inherited from interface org.camunda.bpm.engine.batch.Batch
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_SET_EXTERNAL_TASK_RETRIES, TYPE_SET_JOB_RETRIES
 
Constructor Summary
BatchEntity()
           
 
Method Summary
protected  Date calculateMonitorJobDueDate()
           
 JobDefinitionEntity createBatchJobDefinition()
           
 JobEntity createMonitorJob(boolean setDueDate)
           
 JobDefinitionEntity createMonitorJobDefinition()
           
 JobEntity createSeedJob()
           
 JobDefinitionEntity createSeedJobDefinition()
           
 void delete(boolean cascadeToHistory)
           
 void deleteMonitorJob()
           
 void deleteSeedJob()
           
 void fireHistoricEndEvent()
           
 void fireHistoricStartEvent()
           
 JobDefinitionEntity getBatchJobDefinition()
           
 String getBatchJobDefinitionId()
           
 BatchJobHandler<?> getBatchJobHandler()
           
 int getBatchJobsPerSeed()
           
 String getConfiguration()
           
 byte[] getConfigurationBytes()
           
 String getId()
           
 int getInvocationsPerBatchJob()
           
 int getJobsCreated()
           
 JobDefinitionEntity getMonitorJobDefinition()
           
 String getMonitorJobDefinitionId()
           
 String getName()
           
 Object getPersistentState()
          Returns a representation of the object, as would be stored in the database.
 int getRevision()
           
 int getRevisionNext()
           
 JobDefinitionEntity getSeedJobDefinition()
           
 String getSeedJobDefinitionId()
           
 int getSuspensionState()
           
 String getTenantId()
           
 int getTotalJobs()
           
 String getType()
           
 boolean isCompleted()
           
 boolean isSuspended()
           Indicates whether this batch is suspended.
 void setBatchJobDefinitionId(String batchJobDefinitionId)
           
 void setBatchJobsPerSeed(int batchJobsPerSeed)
           
 void setConfiguration(String configuration)
           
 void setConfigurationBytes(byte[] configuration)
           
 void setId(String id)
           
 void setInvocationsPerBatchJob(int invocationsPerBatchJob)
           
 void setJobsCreated(int jobsCreated)
           
 void setMonitorJobDefinitionId(String monitorJobDefinitionId)
           
 void setRevision(int revision)
           
 void setSeedJobDefinitionId(String seedJobDefinitionId)
           
 void setSuspensionState(int state)
           
 void setTenantId(String tenantId)
           
 void setTotalJobs(int totalJobs)
           
 void setType(String type)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

BATCH_SEED_JOB_DECLARATION

public static final BatchSeedJobDeclaration BATCH_SEED_JOB_DECLARATION

BATCH_MONITOR_JOB_DECLARATION

public static final BatchMonitorJobDeclaration BATCH_MONITOR_JOB_DECLARATION

id

protected String id

type

protected String type

totalJobs

protected int totalJobs

jobsCreated

protected int jobsCreated

batchJobsPerSeed

protected int batchJobsPerSeed

invocationsPerBatchJob

protected int invocationsPerBatchJob

seedJobDefinitionId

protected String seedJobDefinitionId

monitorJobDefinitionId

protected String monitorJobDefinitionId

batchJobDefinitionId

protected String batchJobDefinitionId

configuration

protected ByteArrayField configuration

tenantId

protected String tenantId

suspensionState

protected int suspensionState

revision

protected int revision

seedJobDefinition

protected JobDefinitionEntity seedJobDefinition

monitorJobDefinition

protected JobDefinitionEntity monitorJobDefinition

batchJobDefinition

protected JobDefinitionEntity batchJobDefinition

batchJobHandler

protected BatchJobHandler<?> batchJobHandler
Constructor Detail

BatchEntity

public BatchEntity()
Method Detail

getId

public String getId()
Specified by:
getId in interface Batch
Specified by:
getId in interface DbEntity
Returns:
the id of the batch

setId

public void setId(String id)
Specified by:
setId in interface DbEntity

getName

public String getName()
Specified by:
getName in interface Nameable

getType

public String getType()
Specified by:
getType in interface Batch
Returns:
the type of the batch

setType

public void setType(String type)

getTotalJobs

public int getTotalJobs()
Specified by:
getTotalJobs in interface Batch
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 interface Batch
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 interface Batch
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 interface Batch
Returns:
the number of invocations executed per batch job

setInvocationsPerBatchJob

public void setInvocationsPerBatchJob(int invocationsPerBatchJob)

getSeedJobDefinitionId

public String getSeedJobDefinitionId()
Specified by:
getSeedJobDefinitionId in interface Batch
Returns:
the id of the batch seed job definition

setSeedJobDefinitionId

public void setSeedJobDefinitionId(String seedJobDefinitionId)

getMonitorJobDefinitionId

public String getMonitorJobDefinitionId()
Specified by:
getMonitorJobDefinitionId in interface Batch
Returns:
the id of the batch monitor job definition

setMonitorJobDefinitionId

public void setMonitorJobDefinitionId(String monitorJobDefinitionId)

getBatchJobDefinitionId

public String getBatchJobDefinitionId()
Specified by:
getBatchJobDefinitionId in interface Batch
Returns:
the id of the batch job definition

setBatchJobDefinitionId

public void setBatchJobDefinitionId(String batchJobDefinitionId)

getTenantId

public String getTenantId()
Specified by:
getTenantId in interface Batch
Returns:
the batch's tenant id or null

setTenantId

public void setTenantId(String tenantId)

getConfiguration

public String getConfiguration()

setConfiguration

public void setConfiguration(String configuration)

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 interface Batch
Returns:
true if this batch is currently suspended, false otherwise
See Also:
ManagementService.suspendBatchById(String), ManagementService.activateBatchById(String)

setRevision

public void setRevision(int revision)
Specified by:
setRevision in interface HasDbRevision

getRevision

public int getRevision()
Specified by:
getRevision in interface HasDbRevision

getRevisionNext

public int getRevisionNext()
Specified by:
getRevisionNext in interface HasDbRevision

getSeedJobDefinition

public JobDefinitionEntity getSeedJobDefinition()

getMonitorJobDefinition

public JobDefinitionEntity getMonitorJobDefinition()

getBatchJobDefinition

public JobDefinitionEntity getBatchJobDefinition()

getConfigurationBytes

public byte[] getConfigurationBytes()

setConfigurationBytes

public void setConfigurationBytes(byte[] configuration)

getBatchJobHandler

public BatchJobHandler<?> getBatchJobHandler()

getPersistentState

public Object 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 interface DbEntity

createSeedJobDefinition

public JobDefinitionEntity createSeedJobDefinition()

createMonitorJobDefinition

public JobDefinitionEntity createMonitorJobDefinition()

createBatchJobDefinition

public JobDefinitionEntity createBatchJobDefinition()

createSeedJob

public JobEntity createSeedJob()

deleteSeedJob

public void deleteSeedJob()

createMonitorJob

public JobEntity createMonitorJob(boolean setDueDate)

calculateMonitorJobDueDate

protected Date calculateMonitorJobDueDate()

deleteMonitorJob

public void deleteMonitorJob()

delete

public void delete(boolean cascadeToHistory)

fireHistoricStartEvent

public void fireHistoricStartEvent()

fireHistoricEndEvent

public void fireHistoricEndEvent()

isCompleted

public boolean isCompleted()

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2018 camunda services GmbH. All rights reserved.