public class JdbcJobRepositoryService extends Object implements org.jboss.msc.service.Service<org.jberet.repository.JobRepository>
| Constructor and Description |
|---|
JdbcJobRepositoryService(Integer executionRecordsLimit) |
| Modifier and Type | Method and Description |
|---|---|
void |
addJob(org.jberet.repository.ApplicationAndJobName applicationAndJobName,
org.jberet.job.model.Job job) |
void |
addPartitionExecution(org.jberet.runtime.StepExecutionImpl enclosingStepExecution,
org.jberet.runtime.PartitionExecutionImpl partitionExecution) |
void |
addStepExecution(org.jberet.runtime.JobExecutionImpl jobExecution,
org.jberet.runtime.StepExecutionImpl stepExecution) |
int |
countStepStartTimes(String stepName,
long jobInstanceId) |
org.jberet.runtime.JobExecutionImpl |
createJobExecution(org.jberet.runtime.JobInstanceImpl jobInstance,
Properties jobParameters) |
org.jberet.runtime.JobInstanceImpl |
createJobInstance(org.jberet.job.model.Job job,
String applicationName,
ClassLoader classLoader) |
org.jberet.runtime.StepExecutionImpl |
createStepExecution(String stepName) |
org.jberet.runtime.StepExecutionImpl |
findOriginalStepExecutionForRestart(String stepName,
org.jberet.runtime.JobExecutionImpl jobExecutionToRestart,
ClassLoader classLoader) |
org.jboss.msc.value.InjectedValue<DataSource> |
getDataSourceInjector() |
protected org.jberet.repository.JobRepository |
getDelegate() |
org.jboss.msc.inject.Injector<ExecutorService> |
getExecutorServiceInjector() |
org.jberet.job.model.Job |
getJob(org.jberet.repository.ApplicationAndJobName applicationAndJobName) |
javax.batch.runtime.JobExecution |
getJobExecution(long jobExecutionId) |
List<javax.batch.runtime.JobExecution> |
getJobExecutions(javax.batch.runtime.JobInstance jobInstance) |
List<Long> |
getJobExecutionsByJob(String jobName) |
List<Long> |
getJobExecutionsByJob(String jobName,
Integer executionRecordsLimit) |
javax.batch.runtime.JobInstance |
getJobInstance(long jobInstanceId) |
int |
getJobInstanceCount(String jobName) |
List<javax.batch.runtime.JobInstance> |
getJobInstances(String jobName) |
Set<String> |
getJobNames() |
List<org.jberet.runtime.PartitionExecutionImpl> |
getPartitionExecutions(long stepExecutionId,
org.jberet.runtime.StepExecutionImpl stepExecution,
boolean notCompletedOnly,
ClassLoader classLoader) |
List<Long> |
getRunningExecutions(String jobName) |
List<javax.batch.runtime.StepExecution> |
getStepExecutions(long jobExecutionId,
ClassLoader classLoader) |
org.jberet.repository.JobRepository |
getValue() |
boolean |
jobExists(String jobName) |
void |
removeJob(String jobId) |
void |
removeJobExecutions(org.jberet.repository.JobExecutionSelector jobExecutionSelector) |
void |
removeJobInstance(long jobInstanceId) |
void |
savePersistentData(javax.batch.runtime.JobExecution jobExecution,
org.jberet.runtime.AbstractStepExecution stepOrPartitionExecution) |
int |
savePersistentDataIfNotStopping(javax.batch.runtime.JobExecution jobExecution,
org.jberet.runtime.AbstractStepExecution abstractStepExecution) |
void |
start(org.jboss.msc.service.StartContext context) |
void |
startJobRepository(org.jboss.msc.service.StartContext context) |
void |
stop(org.jboss.msc.service.StopContext context) |
void |
stopJobExecution(org.jberet.runtime.JobExecutionImpl jobExecution) |
void |
stopJobRepository(org.jboss.msc.service.StopContext context) |
void |
updateJobExecution(org.jberet.runtime.JobExecutionImpl jobExecution,
boolean fullUpdate,
boolean saveJobParameters) |
void |
updateStepExecution(javax.batch.runtime.StepExecution stepExecution) |
public JdbcJobRepositoryService(Integer executionRecordsLimit)
public void startJobRepository(org.jboss.msc.service.StartContext context)
throws org.jboss.msc.service.StartException
org.jboss.msc.service.StartExceptionpublic void stopJobRepository(org.jboss.msc.service.StopContext context)
protected org.jberet.repository.JobRepository getDelegate()
public org.jboss.msc.value.InjectedValue<DataSource> getDataSourceInjector()
public org.jboss.msc.inject.Injector<ExecutorService> getExecutorServiceInjector()
public final void start(org.jboss.msc.service.StartContext context)
throws org.jboss.msc.service.StartException
start in interface org.jboss.msc.Serviceorg.jboss.msc.service.StartExceptionpublic final void stop(org.jboss.msc.service.StopContext context)
stop in interface org.jboss.msc.Servicepublic final org.jberet.repository.JobRepository getValue()
throws IllegalStateException,
IllegalArgumentException
getValue in interface org.jboss.msc.value.Value<org.jberet.repository.JobRepository>IllegalStateExceptionIllegalArgumentExceptionpublic void addJob(org.jberet.repository.ApplicationAndJobName applicationAndJobName,
org.jberet.job.model.Job job)
addJob in interface org.jberet.repository.JobRepositorypublic void removeJob(String jobId)
removeJob in interface org.jberet.repository.JobRepositorypublic org.jberet.job.model.Job getJob(org.jberet.repository.ApplicationAndJobName applicationAndJobName)
getJob in interface org.jberet.repository.JobRepositorypublic Set<String> getJobNames()
getJobNames in interface org.jberet.repository.JobRepositorypublic boolean jobExists(String jobName)
WildFly JBeret subsystem validates a job name before each batch job operations.
If a job name is invalid, NoSuchJobException would already have been thrown.
So this method is optimized to always return true.
jobExists in interface org.jberet.repository.JobRepositorypublic org.jberet.runtime.JobInstanceImpl createJobInstance(org.jberet.job.model.Job job,
String applicationName,
ClassLoader classLoader)
createJobInstance in interface org.jberet.repository.JobRepositorypublic void removeJobInstance(long jobInstanceId)
removeJobInstance in interface org.jberet.repository.JobRepositorypublic javax.batch.runtime.JobInstance getJobInstance(long jobInstanceId)
getJobInstance in interface org.jberet.repository.JobRepositorypublic List<javax.batch.runtime.JobInstance> getJobInstances(String jobName)
getJobInstances in interface org.jberet.repository.JobRepositorypublic int getJobInstanceCount(String jobName)
getJobInstanceCount in interface org.jberet.repository.JobRepositorypublic org.jberet.runtime.JobExecutionImpl createJobExecution(org.jberet.runtime.JobInstanceImpl jobInstance,
Properties jobParameters)
createJobExecution in interface org.jberet.repository.JobRepositorypublic javax.batch.runtime.JobExecution getJobExecution(long jobExecutionId)
getJobExecution in interface org.jberet.repository.JobRepositorypublic List<javax.batch.runtime.JobExecution> getJobExecutions(javax.batch.runtime.JobInstance jobInstance)
getJobExecutions in interface org.jberet.repository.JobRepositorypublic void updateJobExecution(org.jberet.runtime.JobExecutionImpl jobExecution,
boolean fullUpdate,
boolean saveJobParameters)
updateJobExecution in interface org.jberet.repository.JobRepositorypublic void stopJobExecution(org.jberet.runtime.JobExecutionImpl jobExecution)
stopJobExecution in interface org.jberet.repository.JobRepositorypublic List<Long> getRunningExecutions(String jobName)
getRunningExecutions in interface org.jberet.repository.JobRepositorypublic void removeJobExecutions(org.jberet.repository.JobExecutionSelector jobExecutionSelector)
removeJobExecutions in interface org.jberet.repository.JobRepositorypublic List<javax.batch.runtime.StepExecution> getStepExecutions(long jobExecutionId, ClassLoader classLoader)
getStepExecutions in interface org.jberet.repository.JobRepositorypublic org.jberet.runtime.StepExecutionImpl createStepExecution(String stepName)
createStepExecution in interface org.jberet.repository.JobRepositorypublic void addStepExecution(org.jberet.runtime.JobExecutionImpl jobExecution,
org.jberet.runtime.StepExecutionImpl stepExecution)
addStepExecution in interface org.jberet.repository.JobRepositorypublic void updateStepExecution(javax.batch.runtime.StepExecution stepExecution)
updateStepExecution in interface org.jberet.repository.JobRepositorypublic org.jberet.runtime.StepExecutionImpl findOriginalStepExecutionForRestart(String stepName, org.jberet.runtime.JobExecutionImpl jobExecutionToRestart, ClassLoader classLoader)
findOriginalStepExecutionForRestart in interface org.jberet.repository.JobRepositorypublic int countStepStartTimes(String stepName, long jobInstanceId)
countStepStartTimes in interface org.jberet.repository.JobRepositorypublic void addPartitionExecution(org.jberet.runtime.StepExecutionImpl enclosingStepExecution,
org.jberet.runtime.PartitionExecutionImpl partitionExecution)
addPartitionExecution in interface org.jberet.repository.JobRepositorypublic List<org.jberet.runtime.PartitionExecutionImpl> getPartitionExecutions(long stepExecutionId, org.jberet.runtime.StepExecutionImpl stepExecution, boolean notCompletedOnly, ClassLoader classLoader)
getPartitionExecutions in interface org.jberet.repository.JobRepositorypublic void savePersistentData(javax.batch.runtime.JobExecution jobExecution,
org.jberet.runtime.AbstractStepExecution stepOrPartitionExecution)
savePersistentData in interface org.jberet.repository.JobRepositorypublic int savePersistentDataIfNotStopping(javax.batch.runtime.JobExecution jobExecution,
org.jberet.runtime.AbstractStepExecution abstractStepExecution)
savePersistentDataIfNotStopping in interface org.jberet.repository.JobRepositorypublic List<Long> getJobExecutionsByJob(String jobName)
getJobExecutionsByJob in interface org.jberet.repository.JobRepositoryCopyright © 2022 JBoss by Red Hat. All rights reserved.