public class GroupAwareJob extends java.lang.Object implements Job
Job
that can optionally prepend a group name to another job's name,
to make it fit a naming convention for type or origin. E.g. the source job
might be overnightJob
and the group
financeDepartment
, which would result in a Job
with
identical functionality but named financeDepartment.overnightJob
. The use of a "." separator for elements is deliberate, since it is a "safe"
character in a URL.Constructor and Description |
---|
GroupAwareJob(Job delegate)
Create a new
Job with the delegate and no group name. |
GroupAwareJob(java.lang.String groupName,
Job delegate)
Create a new
Job with the given group name and delegate. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
void |
execute(JobExecution execution)
Run the
JobExecution and update the meta information like status
and statistics as necessary. |
JobParametersIncrementer |
getJobParametersIncrementer()
If clients need to generate new parameters for the next execution in a
sequence they can use this incrementer.
|
JobParametersValidator |
getJobParametersValidator()
A validator for the job parameters of a
JobExecution . |
java.lang.String |
getName()
Concatenates the group name and the delegate job name (joining with a
".").
|
int |
hashCode() |
boolean |
isRestartable()
Flag to indicate if this job can be restarted, at least in principle.
|
java.lang.String |
toString() |
public GroupAwareJob(Job delegate)
Job
with the delegate and no group name.delegate
- a delegate for the features of a regular Jobpublic void execute(JobExecution execution)
Job
JobExecution
and update the meta information like status
and statistics as necessary. This method should not throw any exceptions
for failed execution. Clients should be careful to inspect the
JobExecution
status to determine success or failure.execute
in interface Job
execution
- a JobExecution
public java.lang.String getName()
getName
in interface Job
Job.getName()
public boolean isRestartable()
Job
isRestartable
in interface Job
@Nullable public JobParametersIncrementer getJobParametersIncrementer()
Job
null
,
in the case that this job does not have a natural sequence.getJobParametersIncrementer
in interface Job
public JobParametersValidator getJobParametersValidator()
Job
JobExecution
. Clients of
a Job may need to validate the parameters for a launch, before or during
the execution.getJobParametersValidator
in interface Job
null
)public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object