public abstract class JobEntity extends Object implements Serializable, Job, DbEntity, HasDbRevision
TimerEntity
or MessageEntity
.Modifier and Type | Field and Description |
---|---|
protected String |
activityId |
static boolean |
DEFAULT_EXCLUSIVE |
static int |
DEFAULT_RETRIES |
protected String |
deploymentId |
protected Date |
duedate |
protected ByteArrayEntity |
exceptionByteArray |
protected String |
exceptionByteArrayId |
protected String |
exceptionMessage |
protected boolean |
executing |
protected ExecutionEntity |
execution |
protected String |
executionId |
protected String |
id |
protected boolean |
isExclusive |
protected JobDefinition |
jobDefinition |
protected String |
jobDefinitionId |
protected String |
jobHandlerConfiguration |
protected String |
jobHandlerType |
protected Date |
lockExpirationTime |
protected String |
lockOwner |
static int |
MAX_EXCEPTION_MESSAGE_LENGTH
Note:
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 |
processDefinitionId |
protected String |
processDefinitionKey |
protected String |
processInstanceId |
protected int |
retries |
protected int |
revision |
protected long |
sequenceCounter |
protected int |
suspensionState |
Constructor and Description |
---|
JobEntity() |
Modifier and Type | Method and Description |
---|---|
protected void |
createFailedJobIncident() |
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() |
protected 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() |
String |
getJobHandlerConfiguration() |
String |
getJobHandlerType() |
Date |
getLockExpirationTime() |
String |
getLockOwner() |
Object |
getPersistentState()
Returns a representation of the object,
as would be stored in the database.
|
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() |
abstract String |
getType() |
int |
hashCode() |
void |
incrementSequenceCounter() |
void |
insert() |
boolean |
isExclusive() |
boolean |
isExecuting() |
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 |
setExecuting(boolean executing) |
void |
setExecution(ExecutionEntity execution) |
void |
setExecutionId(String executionId) |
void |
setId(String id) |
void |
setJobDefinitionId(String jobDefinitionId) |
void |
setJobHandlerConfiguration(String jobHandlerConfiguration) |
void |
setJobHandlerType(String jobHandlerType) |
void |
setLockExpirationTime(Date claimedUntil) |
void |
setLockOwner(String claimedBy) |
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) |
String |
toString() |
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 / 2protected 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 boolean executing
protected String activityId
protected JobDefinition jobDefinition
protected ExecutionEntity execution
protected long sequenceCounter
public void execute(CommandContext commandContext)
protected void preExecute(CommandContext commandContext)
protected void postExecute(CommandContext commandContext)
public void insert()
public void delete()
public void delete(boolean incidentResolved)
public Object getPersistentState()
DbEntity
getPersistentState
in interface DbEntity
public int getRevisionNext()
getRevisionNext
in interface HasDbRevision
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)
protected 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)
public String getExceptionStacktrace()
public void setSuspensionState(int state)
public int getSuspensionState()
public boolean isSuspended()
Job
isSuspended
in interface Job
public String getLockOwner()
public void setLockOwner(String claimedBy)
public Date getLockExpirationTime()
public void setLockExpirationTime(Date claimedUntil)
public String getProcessInstanceId()
Job
getProcessInstanceId
in interface Job
public void setProcessInstanceId(String processInstanceId)
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 boolean isExclusive()
public void setExclusive(boolean isExclusive)
public String getId()
Job
public Date getDuedate()
Job
getDuedate
in interface Job
public void setDuedate(Date duedate)
public void setExceptionStacktrace(String exception)
protected JobHandler getJobHandler()
public String getJobHandlerType()
public void setJobHandlerType(String jobHandlerType)
public String getJobHandlerConfiguration()
public void setJobHandlerConfiguration(String jobHandlerConfiguration)
public int getRevision()
getRevision
in interface HasDbRevision
public void setRevision(int revision)
setRevision
in interface HasDbRevision
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()
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 boolean isExecuting()
public void setExecuting(boolean executing)
public String getActivityId()
public void setActivityId(String activityId)
protected void ensureActivityIdInitialized()
public abstract String getType()
Copyright © 2018. All rights reserved.