|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.camunda.bpm.engine.impl.persistence.entity.JobEntity
public abstract class JobEntity
Stub of the common parts of a Job. You will normally work with a subclass of
JobEntity, such as TimerEntity or MessageEntity.
| Constructor Summary | |
|---|---|
JobEntity()
|
|
| Method Summary | |
|---|---|
protected void |
createFailedJobIncident()
|
protected IncidentContext |
createIncidentContext()
|
void |
delete()
|
void |
delete(boolean incidentResolved)
|
protected void |
ensureActivityIdInitialized()
|
protected void |
ensureExceptionByteArrayInitialized()
|
protected void |
ensureExecutionInitialized()
|
protected void |
ensureJobDefinitionInitialized()
|
boolean |
equals(Object obj)
|
void |
execute(CommandContext commandContext)
|
String |
getActivityId()
|
String |
getDeploymentId()
Returns the id of the deployment in which context the job was created. |
Date |
getDuedate()
Returns the date on which this job is supposed to be processed. |
protected ByteArrayEntity |
getExceptionByteArray()
|
String |
getExceptionByteArrayId()
|
String |
getExceptionMessage()
Returns the message of the exception that occurred, the last time the job was executed. |
String |
getExceptionStacktrace()
|
ExecutionEntity |
getExecution()
|
String |
getExecutionId()
Returns the specific execution on which the job was created. |
String |
getId()
Returns the unique identifier for this job. |
JobDefinition |
getJobDefinition()
|
String |
getJobDefinitionId()
The id of the JobDefinition for this job. |
protected JobHandler |
getJobHandler()
|
JobHandlerConfiguration |
getJobHandlerConfiguration()
|
String |
getJobHandlerConfigurationRaw()
|
String |
getJobHandlerType()
|
Date |
getLockExpirationTime()
|
String |
getLockOwner()
|
Object |
getPersistentState()
Returns a representation of the object, as would be stored in the database. |
long |
getPriority()
The job's priority that is a hint to job acquisition. |
String |
getProcessDefinitionId()
Returns the id of the process definition which created the job. |
String |
getProcessDefinitionKey()
Returns the key of the process definition which created the job. |
String |
getProcessInstanceId()
Returns the id of the process instance which execution created the job. |
int |
getRetries()
Returns the number of retries this job has left. |
int |
getRevision()
|
int |
getRevisionNext()
|
long |
getSequenceCounter()
|
int |
getSuspensionState()
|
String |
getTenantId()
The id of the tenant this job belongs to. |
abstract String |
getType()
|
int |
hashCode()
|
void |
incrementSequenceCounter()
|
void |
init(CommandContext commandContext)
|
void |
insert()
|
boolean |
isExclusive()
|
boolean |
isInInconsistentLockState()
|
boolean |
isSuspended()
Indicates whether this job is suspended. |
protected void |
postExecute(CommandContext commandContext)
|
protected void |
preExecute(CommandContext commandContext)
|
protected void |
removeFailedJobIncident(boolean incidentResolved)
|
void |
resetLock()
|
void |
setActivityId(String activityId)
|
void |
setDeploymentId(String deploymentId)
|
void |
setDuedate(Date duedate)
|
void |
setExceptionMessage(String exceptionMessage)
|
void |
setExceptionStacktrace(String exception)
|
void |
setExclusive(boolean isExclusive)
|
void |
setExecution(ExecutionEntity execution)
|
void |
setExecutionId(String executionId)
|
void |
setId(String id)
|
void |
setJobDefinition(JobDefinition jobDefinition)
|
void |
setJobDefinitionId(String jobDefinitionId)
|
void |
setJobHandlerConfiguration(JobHandlerConfiguration configuration)
|
void |
setJobHandlerConfigurationRaw(String jobHandlerConfiguration)
|
void |
setJobHandlerType(String jobHandlerType)
|
void |
setLockExpirationTime(Date claimedUntil)
|
void |
setLockOwner(String claimedBy)
|
void |
setPriority(long priority)
|
void |
setProcessDefinitionId(String processDefinitionId)
|
void |
setProcessDefinitionKey(String processDefinitionKey)
|
void |
setProcessInstanceId(String processInstanceId)
|
void |
setRetries(int retries)
|
void |
setRetriesFromPersistence(int retries)
|
void |
setRevision(int revision)
|
void |
setSequenceCounter(long sequenceCounter)
|
void |
setSuspensionState(int state)
|
void |
setTenantId(String tenantId)
|
String |
toString()
|
void |
unlock()
Unlock from current lock owner |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final boolean DEFAULT_EXCLUSIVE
public static final int DEFAULT_RETRIES
public static int MAX_EXCEPTION_MESSAGE_LENGTH
String.length() counts Unicode supplementary
characters twice, so for a String consisting only of those,
the limit is effectively MAX_EXCEPTION_MESSAGE_LENGTH / 2
protected String id
protected int revision
protected Date duedate
protected String lockOwner
protected Date lockExpirationTime
protected String executionId
protected String processInstanceId
protected String processDefinitionId
protected String processDefinitionKey
protected boolean isExclusive
protected int retries
protected int suspensionState
protected String jobHandlerType
protected String jobHandlerConfiguration
protected ByteArrayEntity exceptionByteArray
protected String exceptionByteArrayId
protected String exceptionMessage
protected String deploymentId
protected String jobDefinitionId
protected long priority
protected String tenantId
protected String activityId
protected JobDefinition jobDefinition
protected ExecutionEntity execution
protected long sequenceCounter
| Constructor Detail |
|---|
public JobEntity()
| Method Detail |
|---|
public void execute(CommandContext commandContext)
protected void preExecute(CommandContext commandContext)
protected void postExecute(CommandContext commandContext)
public void init(CommandContext commandContext)
public void insert()
public void delete()
public void delete(boolean incidentResolved)
public Object getPersistentState()
DbEntity
getPersistentState in interface DbEntitypublic int getRevisionNext()
getRevisionNext in interface HasDbRevisionpublic void setExecution(ExecutionEntity execution)
public long getSequenceCounter()
public void setSequenceCounter(long sequenceCounter)
public void incrementSequenceCounter()
public String getExecutionId()
Job
getExecutionId in interface Jobpublic void setExecutionId(String executionId)
public ExecutionEntity getExecution()
protected void ensureExecutionInitialized()
public int getRetries()
Job
getRetries in interface Jobpublic void setRetries(int retries)
public void setRetriesFromPersistence(int retries)
protected void createFailedJobIncident()
protected void removeFailedJobIncident(boolean incidentResolved)
protected IncidentContext createIncidentContext()
public String getExceptionStacktrace()
public void setSuspensionState(int state)
public int getSuspensionState()
public boolean isSuspended()
Job
isSuspended in interface Jobpublic String getLockOwner()
public void setLockOwner(String claimedBy)
public Date getLockExpirationTime()
public void setLockExpirationTime(Date claimedUntil)
public String getProcessInstanceId()
Job
getProcessInstanceId in interface Jobpublic void setProcessInstanceId(String processInstanceId)
public String getProcessDefinitionId()
Job
getProcessDefinitionId in interface Jobpublic void setProcessDefinitionId(String processDefinitionId)
public String getProcessDefinitionKey()
Job
getProcessDefinitionKey in interface Jobpublic void setProcessDefinitionKey(String processDefinitionKey)
public boolean isExclusive()
public void setExclusive(boolean isExclusive)
public String getId()
Job
getId in interface DbEntitygetId in interface Jobpublic void setId(String id)
setId in interface DbEntitypublic Date getDuedate()
Job
getDuedate in interface Jobpublic void setDuedate(Date duedate)
public void setExceptionStacktrace(String exception)
protected JobHandler getJobHandler()
public JobHandlerConfiguration getJobHandlerConfiguration()
public void setJobHandlerConfiguration(JobHandlerConfiguration configuration)
public String getJobHandlerType()
public void setJobHandlerType(String jobHandlerType)
public String getJobHandlerConfigurationRaw()
public void setJobHandlerConfigurationRaw(String jobHandlerConfiguration)
public int getRevision()
getRevision in interface HasDbRevisionpublic void setRevision(int revision)
setRevision in interface HasDbRevisionpublic String getExceptionMessage()
JobManagementService.getJobExceptionStacktrace(String)
getExceptionMessage in interface Jobpublic String getJobDefinitionId()
JobJobDefinition for this job.
getJobDefinitionId in interface Jobpublic void setJobDefinitionId(String jobDefinitionId)
public JobDefinition getJobDefinition()
public void setJobDefinition(JobDefinition jobDefinition)
protected void ensureJobDefinitionInitialized()
public void setExceptionMessage(String exceptionMessage)
public String getExceptionByteArrayId()
protected ByteArrayEntity getExceptionByteArray()
protected void ensureExceptionByteArrayInitialized()
public String getDeploymentId()
Job
getDeploymentId in interface Jobpublic void setDeploymentId(String deploymentId)
public boolean isInInconsistentLockState()
public void resetLock()
public String getActivityId()
public void setActivityId(String activityId)
public long getPriority()
Job
getPriority in interface Jobpublic void setPriority(long priority)
public String getTenantId()
Jobnull
if the job belongs to no single tenant.
getTenantId in interface Jobpublic void setTenantId(String tenantId)
protected void ensureActivityIdInitialized()
public void unlock()
public abstract String getType()
public int hashCode()
hashCode in class Objectpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||