public class UnusableJobDetails extends AbstractJobDetails
JobDetails that always throws an exception when the
parameters are accessed. This can be used when the JobRunner is unavailable or
an exception occurs while trying to deserialize the parameters.jobId, jobRunnerKey, runMode, schedule| Constructor and Description |
|---|
UnusableJobDetails(JobId jobId,
JobRunnerKey jobRunnerKey,
RunMode runMode,
Schedule schedule,
Date nextRunTime,
byte[] parameters,
Throwable cause) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendToStringDetails(StringBuilder sb) |
Map<String,Serializable> |
getParameters()
The parameters are not available because the map could not be reconstructed.
|
boolean |
isRunnable()
Returns
true if this job could be successfully run at this time. |
getJobId, getJobRunnerKey, getNextRunTime, getRawParameters, getRunMode, getSchedule, toStringpublic UnusableJobDetails(JobId jobId, JobRunnerKey jobRunnerKey, RunMode runMode, Schedule schedule, @Nullable Date nextRunTime, byte[] parameters, @Nullable Throwable cause)
cause - the reason the parameters are unavailable. If left null, then
it is assumed that the JobRunner is not available.@Nonnull public Map<String,Serializable> getParameters()
SchedulerRuntimeException - Unconditionally. The exception's cause will be
either a JobRunnerNotRegisteredException or the error that occurred during
deserialization.public boolean isRunnable()
JobDetailstrue if this job could be successfully run at this time. This requires it to have
a registered JobRunner whose class loader can successfully reconstruct the job's
parameter map.true if this job is currently runnable; false otherwiseprotected void appendToStringDetails(StringBuilder sb)
appendToStringDetails in class AbstractJobDetailsCopyright © 2017 Atlassian. All rights reserved.