public class DefaultBatchStep extends org.mule.runtime.core.api.processor.AbstractMessageProcessorOwner implements BatchStepAdapter
BatchSteplogger, muleContext| Constructor and Description |
|---|
DefaultBatchStep() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
boolean |
equals(Object obj) |
boolean |
finishIfCompleted(BatchJobInstanceAdapter jobInstance,
BatchTransactionContext ctx)
If the step has processed all the records for the given
BatchJobInstanceAdapter, then it fires a
BatchNotification.STEP_JOB_END notification and flushes the
step's commit (if any) |
BatchEngine |
getBatchEngine() |
DefaultBatchStepAggregator |
getBatchStepAggregator()
If this step has an aggregator block, then this method returns the underlying
BatchStepAggregator |
ExceptionHistory |
getExceptionHistory(BatchJobInstanceAdapter jobInstance)
Returns the
ExceptionHistory associated to the given
BatchJobInstanceAdapter |
String |
getName()
The name of the step.
|
BatchStep |
getNextStep()
Returns the
BatchStep that follows right after this one |
protected List<org.mule.runtime.core.api.processor.Processor> |
getOwnedMessageProcessors() |
int |
hashCode() |
void |
initialise() |
boolean |
isLast()
Whether this step is the last in its
BatchJob or not |
Record |
onRecord(Record record,
BatchTransactionContext ctx)
Process the given
Record for the given BatchJobInstanceAdapter |
void |
releaseResources(BatchJobInstanceAdapter jobInstance)
Releases any resources that the step has allocated for the given jobInstance, such as
ExceptionHistory, AggregatorRecordBuffer, etc. |
void |
setAcceptExpression(String expression) |
void |
setAcceptPolicy(com.mulesoft.mule.runtime.module.batch.internal.record.AcceptRecordPolicy acceptPolicy) |
void |
setBatchEngine(BatchEngine batchEngine) |
void |
setBatchStepAggregator(DefaultBatchStepAggregator batchStepAggregator) |
void |
setExceptionReporter(StepExceptionReporter exceptionReporter) |
void |
setExpressionManager(org.mule.runtime.core.api.el.ExpressionManager expressionManager) |
void |
setJob(BatchJobAdapter job) |
void |
setLast(boolean last) |
void |
setMessageProcessors(List<org.mule.runtime.core.api.processor.Processor> messageProcessors) |
void |
setName(String name) |
void |
setNextStep(BatchStep nextStep) |
void |
setNotificationDispatcher(org.mule.runtime.api.notification.NotificationDispatcher notificationFirer) |
void |
start() |
void |
stop() |
getOwnedObjectsgetMuleContext, setMuleContextgetAnnotation, getAnnotations, getDslSource, getIdentifier, getLocation, getRepresentation, getRootContainerLocation, initRootContainerName, setAnnotationsclone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetLocationpublic void initialise()
throws org.mule.runtime.api.lifecycle.InitialisationException
initialise in interface org.mule.runtime.api.lifecycle.Initialisableinitialise in class org.mule.runtime.core.api.processor.AbstractMuleObjectOwner<org.mule.runtime.core.api.processor.Processor>org.mule.runtime.api.lifecycle.InitialisationExceptionpublic void releaseResources(BatchJobInstanceAdapter jobInstance)
BatchStepAdapterExceptionHistory, AggregatorRecordBuffer, etc.releaseResources in interface BatchStepAdapterjobInstance - a not null BatchJobInstanceAdapterpublic void start()
throws org.mule.runtime.api.exception.MuleException
start in interface org.mule.runtime.api.lifecycle.Startablestart in class org.mule.runtime.core.api.processor.AbstractMuleObjectOwner<org.mule.runtime.core.api.processor.Processor>org.mule.runtime.api.exception.MuleExceptionpublic void stop()
throws org.mule.runtime.api.exception.MuleException
stop in interface org.mule.runtime.api.lifecycle.Stoppablestop in class org.mule.runtime.core.api.processor.AbstractMuleObjectOwner<org.mule.runtime.core.api.processor.Processor>org.mule.runtime.api.exception.MuleExceptionpublic void dispose()
dispose in interface org.mule.runtime.api.lifecycle.Disposabledispose in class org.mule.runtime.core.api.processor.AbstractMuleObjectOwner<org.mule.runtime.core.api.processor.Processor>public Record onRecord(Record record, BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
Record for the given BatchJobInstanceAdapteronRecord in interface BatchStepAdapterrecord - a Recordctx - the BatchTransactionContext in wich the
record is to be executedRecordorg.mule.runtime.api.exception.MuleExceptionpublic boolean finishIfCompleted(BatchJobInstanceAdapter jobInstance, BatchTransactionContext ctx)
BatchJobInstanceAdapter, then it fires a
BatchNotification.STEP_JOB_END notification and flushes the
step's commit (if any)finishIfCompleted in interface BatchStepAdapterjobInstance - a BatchJobInstanceAdapterctx - the tx context that is being used for this work run.true if all records were processed. false otherwiseprotected List<org.mule.runtime.core.api.processor.Processor> getOwnedMessageProcessors()
getOwnedMessageProcessors in class org.mule.runtime.core.api.processor.AbstractMessageProcessorOwnerpublic void setMessageProcessors(List<org.mule.runtime.core.api.processor.Processor> messageProcessors)
public void setBatchStepAggregator(DefaultBatchStepAggregator batchStepAggregator)
public void setAcceptPolicy(com.mulesoft.mule.runtime.module.batch.internal.record.AcceptRecordPolicy acceptPolicy)
public void setAcceptExpression(String expression)
expression - a MEL a MEL expression that if evaluated to false filters the incoming recordpublic String getName()
BatchStepBatchJobpublic void setName(String name)
@Inject public void setBatchEngine(BatchEngine batchEngine)
public void setLast(boolean last)
public boolean isLast()
BatchStepAdapterBatchJob or notisLast in interface BatchStepAdapterpublic void setNextStep(BatchStep nextStep)
public BatchStep getNextStep()
BatchStepAdapterBatchStep that follows right after this onegetNextStep in interface BatchStepAdapterBatchStep or null if this is the last onepublic ExceptionHistory getExceptionHistory(BatchJobInstanceAdapter jobInstance)
BatchStepAdapterExceptionHistory associated to the given
BatchJobInstanceAdaptergetExceptionHistory in interface BatchStepAdapterExceptionHistory or nullpublic DefaultBatchStepAggregator getBatchStepAggregator()
BatchStepAdapterBatchStepAggregatorgetBatchStepAggregator in interface BatchStepAdapterBatchStepAggregator or nullpublic BatchEngine getBatchEngine()
public void setJob(BatchJobAdapter job)
public void setExceptionReporter(StepExceptionReporter exceptionReporter)
public void setExpressionManager(org.mule.runtime.core.api.el.ExpressionManager expressionManager)
public void setNotificationDispatcher(org.mule.runtime.api.notification.NotificationDispatcher notificationFirer)
Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.