public class DefaultBatchJobResult extends Object implements BatchJobResultAdapter
BatchJobResultAdapter| Constructor and Description |
|---|
DefaultBatchJobResult(String batchJodInstanceId) |
| Modifier and Type | Method and Description |
|---|---|
String |
getBatchJobInstanceId() |
Map<String,com.mulesoft.mule.runtime.module.batch.api.BatchStepResult> |
getBatchStepResults()
Returns a
Map in which the key is the name of a step and the value is a BatchStepResult |
long |
getElapsedTimeInMillis() |
long |
getFailedRecords() |
Exception |
getInputPhaseException() |
long |
getLoadedRecords() |
Exception |
getLoadingPhaseException() |
Exception |
getOnCompletePhaseException() |
long |
getProcessedRecords() |
com.mulesoft.mule.runtime.module.batch.api.BatchStepResult |
getResultForStep(String stepId) |
long |
getSuccessfulRecords() |
long |
getTotalRecords() |
long |
incrementLoadedRecords(long howMany)
Increments the load records count by howMany
|
boolean |
isFailedOnCompletePhase() |
boolean |
isFailedOnInputPhase() |
boolean |
isFailedOnLoadingPhase() |
void |
setInputPhaseException(Exception inputPhaseException)
Sets an
Exception thrown in the input phase |
void |
setLoadingPhaseException(Exception loadingPhaseException)
Sets an
Exception thrown in the loading phase |
void |
setOnCompletePhaseException(Exception onCompleteStepException)
Sets an
Exception thrown in the on complete phase |
void |
setTotalRecords(long totalRecords)
sets the amount of total records that make for the owning
BatchJobInstance |
long |
startClock()
Starts tracking the time that a
BatchJobInstance has been processing since the moment that this method has been
invoked. |
long |
stopClock()
Signals that the owning
BatchJobInstance has stopped processing at the time this method was invoked |
void |
updateFor(BatchJobAdapter job,
Collection<Record> records)
Updates the values in this instance
|
public DefaultBatchJobResult(String batchJodInstanceId)
public void updateFor(BatchJobAdapter job, Collection<Record> records)
updateFor in interface BatchJobResultAdapterjob - the owning BatchJobAdapterrecords - a collection of Record processedpublic com.mulesoft.mule.runtime.module.batch.api.BatchStepResult getResultForStep(String stepId)
getResultForStep in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long startClock()
BatchJobInstance has been processing since the moment that this method has been
invoked. After invoking this method, BatchJobResultAdapter.stopClock() has to be invoked at some point so that
BatchJobResult.getElapsedTimeInMillis() can eventually return a valid valuestartClock in interface BatchJobResultAdapterpublic long stopClock()
BatchJobInstance has stopped processing at the time this method was invokedstopClock in interface BatchJobResultAdapterBatchJobInstance has been processingpublic long getElapsedTimeInMillis()
getElapsedTimeInMillis in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long getSuccessfulRecords()
getSuccessfulRecords in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long getFailedRecords()
getFailedRecords in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long getProcessedRecords()
getProcessedRecords in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long getTotalRecords()
getTotalRecords in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic String getBatchJobInstanceId()
getBatchJobInstanceId in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long getLoadedRecords()
getLoadedRecords in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic long incrementLoadedRecords(long howMany)
incrementLoadedRecords in interface BatchJobResultAdapterhowMany - the amount of new records that have been loadedpublic void setTotalRecords(long totalRecords)
BatchJobInstancesetTotalRecords in interface BatchJobResultAdaptertotalRecords - the total amount of recordspublic boolean isFailedOnInputPhase()
isFailedOnInputPhase in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic Exception getInputPhaseException()
getInputPhaseException in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic Exception getLoadingPhaseException()
getLoadingPhaseException in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic boolean isFailedOnLoadingPhase()
isFailedOnLoadingPhase in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic boolean isFailedOnCompletePhase()
isFailedOnCompletePhase in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic Exception getOnCompletePhaseException()
getOnCompletePhaseException in interface com.mulesoft.mule.runtime.module.batch.api.BatchJobResultpublic void setOnCompletePhaseException(Exception onCompleteStepException)
Exception thrown in the on complete phasesetOnCompletePhaseException in interface BatchJobResultAdapteronCompleteStepException - a Exceptionpublic void setInputPhaseException(Exception inputPhaseException)
Exception thrown in the input phasesetInputPhaseException in interface BatchJobResultAdapterinputPhaseException - a Exceptionpublic void setLoadingPhaseException(Exception loadingPhaseException)
Exception thrown in the loading phasesetLoadingPhaseException in interface BatchJobResultAdapterloadingPhaseException - a Exceptionpublic Map<String,com.mulesoft.mule.runtime.module.batch.api.BatchStepResult> getBatchStepResults()
Map in which the key is the name of a step and the value is a BatchStepResultgetBatchStepResults in interface BatchJobResultAdapterCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.