类 GroupAwareJob
- java.lang.Object
- org.springframework.batch.core.configuration.support.GroupAwareJob
- 所有已实现的接口:
Job
public class GroupAwareJob extends java.lang.Object implements Job
AJob
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 beovernightJob
and the groupfinanceDepartment
, which would result in aJob
with identical functionality but namedfinanceDepartment.overnightJob
. The use of a "." separator for elements is deliberate, since it is a "safe" character in a URL.- 作者:
- Dave Syer, Mahmoud Ben Hassine
构造器概要
构造器 构造器 说明 GroupAwareJob(java.lang.String groupName, Job delegate)
Create a newJob
with the given group name and delegate.GroupAwareJob(Job delegate)
Create a newJob
with the delegate and no group name.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 boolean
equals(java.lang.Object obj)
void
execute(JobExecution execution)
Run theJobExecution
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 aJobExecution
.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()
构造器详细资料
GroupAwareJob
public GroupAwareJob(Job delegate)
Create a newJob
with the delegate and no group name.- 参数:
delegate
- a delegate for the features of a regular Job
GroupAwareJob
public GroupAwareJob(@Nullable java.lang.String groupName, Job delegate)
Create a newJob
with the given group name and delegate.- 参数:
groupName
- the group name to prepend (can benull
)delegate
- a delegate for the features of a regular Job
方法详细资料
execute
public void execute(JobExecution execution)
从接口复制的说明:Job
Run theJobExecution
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 theJobExecution
status to determine success or failure.- 指定者:
execute
在接口中Job
- 参数:
execution
- aJobExecution
getName
public java.lang.String getName()
Concatenates the group name and the delegate job name (joining with a ".").- 指定者:
getName
在接口中Job
- 另请参阅:
Job.getName()
isRestartable
public boolean isRestartable()
从接口复制的说明:Job
Flag to indicate if this job can be restarted, at least in principle.- 指定者:
isRestartable
在接口中Job
- 返回:
- true if this job can be restarted after a failure
getJobParametersIncrementer
@Nullable public JobParametersIncrementer getJobParametersIncrementer()
从接口复制的说明:Job
If clients need to generate new parameters for the next execution in a sequence they can use this incrementer. The return value may benull
, in the case that this job does not have a natural sequence.- 指定者:
getJobParametersIncrementer
在接口中Job
- 返回:
- in incrementer to be used for creating new parameters
getJobParametersValidator
public JobParametersValidator getJobParametersValidator()
从接口复制的说明:Job
A validator for the job parameters of aJobExecution
. Clients of a Job may need to validate the parameters for a launch, before or during the execution.- 指定者:
getJobParametersValidator
在接口中Job
- 返回:
- a validator that can be used to check parameter values (never
null
)
equals
public boolean equals(java.lang.Object obj)
- 覆盖:
equals
在类中java.lang.Object
hashCode
public int hashCode()
- 覆盖:
hashCode
在类中java.lang.Object
toString
public java.lang.String toString()
- 覆盖:
toString
在类中java.lang.Object