public interface BatchJobInstanceStore extends BatchProcessingListenersOwner
BatchEngine will use to to handle its
persistent data| Modifier and Type | Method and Description |
|---|---|
void |
clearFailedRecords(BatchJobInstanceAdapter jobInstance)
Removes all the failed records records stored for the given
BatchJobAdapter |
<T extends com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> |
getExecutingInstances()
Retrieves all the
BatchJobInstance that are currently elegible for
execution. |
Iterator<Record> |
getFailedRecords(BatchJobInstanceAdapter jobInstance)
Retrieves all the records of the given
BatchJobInstanceAdapter that failed in at least one step and which execution
has finished |
BatchJobInstanceAdapter |
getJobInstance(String jobName,
String jobInstanceId)
Returns the
BatchJobInstanceAdapter for the given job and id |
<T extends com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> |
getJobInstances(String jobName)
Returns all the
BatchJobInstance for the given job name |
boolean |
remove(com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance jobInstance)
removes the given
BatchJobInstance |
void |
store(BatchJobInstanceAdapter jobInstance)
Stores the given job instance
|
void |
storeFailedRecords(BatchJobInstanceAdapter jobInstance,
Collection<Record> record)
Adds the given
Records to the list of failed records |
void |
update(BatchJobInstanceAdapter jobInstance)
updates the given job instance.
|
addBatchProcessingListener, addBatchProcessingListener, removeBatchProcessingListener, removeBatchProcessingListenervoid store(BatchJobInstanceAdapter jobInstance)
jobInstance - a BatchJobInstanceAdapterIllegalStateException - if the instance already exists in the storevoid update(BatchJobInstanceAdapter jobInstance)
jobInstance - a BatchJobInstanceAdapterboolean remove(com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance jobInstance)
BatchJobInstancejobInstance - a BatchJobInstancetrue if the jobInstance was contained in the store. false otherwiseIterator<Record> getFailedRecords(BatchJobInstanceAdapter jobInstance)
BatchJobInstanceAdapter that failed in at least one step and which execution
has finishedjobInstance - an instance of BatchJobInstanceAdapterIteratorvoid clearFailedRecords(BatchJobInstanceAdapter jobInstance)
BatchJobAdapterjobInstance - an instance of BatchJobInstanceAdaptervoid storeFailedRecords(BatchJobInstanceAdapter jobInstance, Collection<Record> record)
Records to the list of failed recordsjobInstance - an instance of BatchJobInstanceAdapterrecord - a Record which processing has finishedBatchJobInstanceAdapter getJobInstance(String jobName, String jobInstanceId)
BatchJobInstanceAdapter for the given job and idjobName - the name of the owner BatchJobjobInstanceId - the id of the job instanceBatchJobInstanceAdapter or null if none exists.<T extends com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> Iterator<T> getJobInstances(String jobName)
BatchJobInstance for the given job name<T extends com.mulesoft.mule.runtime.module.batch.api.BatchJobInstance> List<T> getExecutingInstances() throws org.mule.runtime.api.exception.MuleException
BatchJobInstance that are currently elegible for
execution. This method has to be thread-safe, meaning that if two threads concurrently invoke this method, the returned list
has to be navigable and modifiable by the two threads without causing issues. This can be achieved by either returning a
synchronized list, returning different copies of the list or whatever mechanism you see fit in your case.List of BatchJobInstanceorg.mule.runtime.api.exception.MuleExceptionCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.