public class LazyJobDetails extends AbstractJobDetails
SchedulerService implementations are encouraged
to prefer this implementation when returning multiple JobDetails
objects, as the deserialization is unnecessary if the caller is not going to
use those values.jobId, jobRunnerKey, runMode, schedule| Constructor and Description |
|---|
LazyJobDetails(AbstractSchedulerService schedulerService,
JobId jobId,
JobRunnerKey jobRunnerKey,
RunMode runMode,
Schedule schedule,
Date nextRunTime,
byte[] parameters)
Creates a lazy job details representation.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
appendToStringDetails(StringBuilder sb) |
Map<String,Serializable> |
getParameters()
Returns the configured runtime parameters for this job.
|
boolean |
isRunnable()
Returns
true if this job could be successfully run at this time. |
getJobId, getJobRunnerKey, getNextRunTime, getRawParameters, getRunMode, getSchedule, toStringpublic LazyJobDetails(AbstractSchedulerService schedulerService, JobId jobId, JobRunnerKey jobRunnerKey, RunMode runMode, Schedule schedule, @Nullable Date nextRunTime, @Nullable byte[] parameters)
WARNING: For efficiency reasons, byte[] parameters is not copied.
jobId - the job's IDjobRunnerKey - the job runner's keyrunMode - the running mode of the jobschedule - the job's schedulenextRunTime - the next run time for the job, if knownparameters - the parameters map in serialized form. For efficiency reasons, this constructor
uses the original array directly without making a safe copy.@Nonnull public Map<String,Serializable> getParameters()
JobDetails
WARNING: If this job was created by a plugin that is not currently active,
then it may not actually be possible to access the job's parameters, and this method will throw
a SchedulerRuntimeException. Callers are encouraged to first call the
JobDetails.isRunnable() method, as a false return value from that method usually
guarantees that this method will fail.
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.