@NoImplement
public interface BatchManager
| Modifier and Type | Method and Description |
|---|---|
void |
cancel(String jobName,
String jobInstanceId)
Same as
stop(String, String) but definitive. |
void |
cancelAllRunningInstances()
Invokes
cancel(String, String) for every BatchJobInstance in
running state. |
void |
delete(String jobName,
String jobInstanceId)
Deletes the given
BatchJobInstance from persistent store |
Collection<BatchJob> |
getBatchJobs()
Returns all the
BatchJob declared in the current mule context |
Iterator<com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> |
getExecutingInstances()
Returns the instance of
BatchJobInstance that are in an executing state |
com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance |
getJobInstance(String jobName,
String jobInstanceId)
Finds a
BatchJobInstance and returns it |
Iterator<com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> |
getJobInstances(String jobName)
Returns all the
BatchJobInstance available for the given jobName |
void |
resume(String jobName,
String jobInstanceId)
Resumes execution of a
BatchJobInstance which was stopped through the stop(String, String) method. |
void |
stop(String jobName,
String jobInstanceId)
Stops the
BatchJobInstance of the given ids. |
Collection<BatchJob> getBatchJobs()
BatchJob declared in the current mule contextBatchJobcom.mulesoft.mule.runtime.module.batch.api.BatchJobInstance getJobInstance(String jobName, String jobInstanceId) throws org.mule.runtime.api.exception.MuleException
BatchJobInstance and returns itjobName - the name of the BatchJob the BatchJobInstance belongs tojobInstanceId - the id of the BatchJobInstanceBatchJobInstance or null if not foundorg.mule.runtime.api.exception.MuleExceptionIterator<com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> getJobInstances(String jobName)
BatchJobInstance available for the given jobNamejobName - the name of the job which instances you wantIterator of BatchJobInstanceIterator<com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> getExecutingInstances() throws Exception
BatchJobInstance that are in an executing statevoid stop(String jobName, String jobInstanceId) throws org.mule.runtime.api.exception.MuleException
BatchJobInstance of the given ids. Stopping means that no more records will be taken from the instance's
queue for processing, but the ones already in the thread pool will finish to complete their current stepjobName - the name of the BatchJob the BatchJobInstance belongs tojobInstanceId - the id of the BatchJobInstanceorg.mule.runtime.api.exception.MuleExceptionvoid resume(String jobName, String jobInstanceId) throws org.mule.runtime.api.exception.MuleException
BatchJobInstance which was stopped through the stop(String, String) method.
Execution is resumed by setting the job instance status back to BatchJobInstanceStatus.EXECUTING. The
BatchNotification.JOB_PROCESS_RECORDS_BEGIN notification will be fired again.jobName - the name of the BatchJob that owns the BatchJobInstancejobInstanceId - the id of the BatchJobInstance to be resumedIllegalStateException - if the BatchJobInstance is in a state other than BatchJobInstanceStatus.STOPPEDorg.mule.runtime.api.exception.MuleException - in case of unhandled errorvoid cancel(String jobName, String jobInstanceId) throws org.mule.runtime.api.exception.MuleException
stop(String, String) but definitive. The instance's queue's and object stores are cleared. All the instances
resources are relinquished and cannot be regainedjobName - the name of the BatchJob the BatchJobInstance belongs tojobInstanceId - the id of the BatchJobInstanceorg.mule.runtime.api.exception.MuleExceptionvoid cancelAllRunningInstances()
throws org.mule.runtime.api.exception.MuleException
cancel(String, String) for every BatchJobInstance in
running state. All running instances will be considered no matter which BatchJob they're linked toorg.mule.runtime.api.exception.MuleExceptionvoid delete(String jobName, String jobInstanceId) throws org.mule.runtime.api.exception.MuleException
BatchJobInstance from persistent storejobName - the name of the BatchJob the BatchJobInstance belongs tojobInstanceId - the id of the BatchJobInstanceorg.mule.runtime.api.exception.MuleExceptionCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.