public abstract class JobEntity extends AcquirableJobEntity implements Serializable, Job, DbEntity, HasDbRevision, HasDbReferences
TimerEntity
or MessageEntity
.Modifier and Type | Field and Description |
---|---|
protected String |
activityId |
protected Date |
createTime |
static int |
DEFAULT_RETRIES |
protected String |
deploymentId |
protected ByteArrayEntity |
exceptionByteArray |
protected String |
exceptionByteArrayId |
protected String |
exceptionMessage |
protected ExecutionEntity |
execution |
protected String |
executionId |
protected JobDefinition |
jobDefinition |
protected String |
jobDefinitionId |
protected String |
jobHandlerConfiguration |
protected String |
jobHandlerType |
protected String |
lastFailureLogId |
protected long |
priority |
protected String |
processDefinitionId |
protected String |
processDefinitionKey |
protected int |
retries |
protected long |
sequenceCounter |
protected int |
suspensionState |
protected String |
tenantId |
DEFAULT_EXCLUSIVE, duedate, id, isExclusive, lockExpirationTime, lockOwner, processInstanceId, revision
Constructor and Description |
---|
JobEntity() |
Modifier and Type | Method and Description |
---|---|
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() |
Date |
getCreateTime()
The date/time when this job has been created
|
String |
getDeploymentId()
Returns the id of the deployment in which context the job was created.
|
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.
|
JobDefinition |
getJobDefinition() |
String |
getJobDefinitionId()
The id of the
JobDefinition for this job. |
protected JobHandler |
getJobHandler() |
JobHandlerConfiguration |
getJobHandlerConfiguration() |
String |
getJobHandlerConfigurationRaw() |
String |
getJobHandlerType() |
String |
getLastFailureLogId() |
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.
|
Map<String,Class> |
getReferencedEntitiesIdAndClass() |
Set<String> |
getReferencedEntityIds() |
int |
getRetries()
Returns the number of retries this job has left.
|
long |
getSequenceCounter() |
int |
getSuspensionState() |
String |
getTenantId()
The id of the tenant this job belongs to.
|
abstract String |
getType() |
void |
incrementSequenceCounter() |
void |
init(CommandContext commandContext) |
void |
insert() |
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 |
setCreateTime(Date createTime) |
void |
setDeploymentId(String deploymentId) |
void |
setExceptionMessage(String exceptionMessage) |
void |
setExceptionStacktrace(String exception) |
void |
setExecution(ExecutionEntity execution) |
void |
setExecutionId(String executionId) |
void |
setJobDefinition(JobDefinition jobDefinition) |
void |
setJobDefinitionId(String jobDefinitionId) |
void |
setJobHandlerConfiguration(JobHandlerConfiguration configuration) |
void |
setJobHandlerConfigurationRaw(String jobHandlerConfiguration) |
void |
setJobHandlerType(String jobHandlerType) |
void |
setLastFailureLogId(String lastFailureLogId) |
void |
setPriority(long priority) |
void |
setProcessDefinitionId(String processDefinitionId) |
void |
setProcessDefinitionKey(String processDefinitionKey) |
void |
setRetries(int retries) |
void |
setRetriesFromPersistence(int retries) |
void |
setSequenceCounter(long sequenceCounter) |
void |
setSuspensionState(int state) |
void |
setTenantId(String tenantId) |
String |
toString() |
void |
unlock()
Unlock from current lock owner
|
getDuedate, getId, getLockExpirationTime, getLockOwner, getProcessInstanceId, getRevision, getRevisionNext, hashCode, isExclusive, setDuedate, setExclusive, setId, setLockExpirationTime, setLockOwner, setProcessInstanceId, setRevision
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getDuedate, getId, getProcessInstanceId
getRevision, getRevisionNext, setRevision
public static final int DEFAULT_RETRIES
protected String executionId
protected String processDefinitionId
protected String processDefinitionKey
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 Date createTime
protected String activityId
protected JobDefinition jobDefinition
protected ExecutionEntity execution
protected long sequenceCounter
protected String lastFailureLogId
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 DbEntity
getPersistentState
in class AcquirableJobEntity
public void setExecution(ExecutionEntity execution)
public long getSequenceCounter()
public void setSequenceCounter(long sequenceCounter)
public void incrementSequenceCounter()
public String getExecutionId()
Job
getExecutionId
in interface Job
public void setExecutionId(String executionId)
public ExecutionEntity getExecution()
protected void ensureExecutionInitialized()
public int getRetries()
Job
getRetries
in interface Job
public 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 Job
public String getProcessDefinitionId()
Job
getProcessDefinitionId
in interface Job
public void setProcessDefinitionId(String processDefinitionId)
public String getProcessDefinitionKey()
Job
getProcessDefinitionKey
in interface Job
public void setProcessDefinitionKey(String processDefinitionKey)
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 String getExceptionMessage()
Job
ManagementService.getJobExceptionStacktrace(String)
getExceptionMessage
in interface Job
public String getJobDefinitionId()
Job
JobDefinition
for this job.getJobDefinitionId
in interface Job
public 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 Job
public 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 Job
public void setPriority(long priority)
public String getTenantId()
Job
null
if the job belongs to no single tenant.getTenantId
in interface Job
public void setTenantId(String tenantId)
public Date getCreateTime()
Job
getCreateTime
in interface Job
public void setCreateTime(Date createTime)
protected void ensureActivityIdInitialized()
public void unlock()
public abstract String getType()
public boolean equals(Object obj)
equals
in class AcquirableJobEntity
public Set<String> getReferencedEntityIds()
getReferencedEntityIds
in interface HasDbReferences
public Map<String,Class> getReferencedEntitiesIdAndClass()
getReferencedEntitiesIdAndClass
in interface HasDbReferences
public String getLastFailureLogId()
public void setLastFailureLogId(String lastFailureLogId)
public String toString()
toString
in class AcquirableJobEntity
Copyright © 2019. All rights reserved.