@NoExtend public class Record extends Object implements Serializable, com.mulesoft.mule.runtime.module.batch.api.record.RecordWithErrors
| Constructor and Description |
|---|
Record(org.mule.runtime.api.metadata.TypedValue<Object> payload) |
Record(org.mule.runtime.api.metadata.TypedValue<Object> payload,
org.mule.runtime.api.metadata.TypedValue<Object> attributes) |
| Modifier and Type | Method and Description |
|---|---|
org.mule.runtime.api.metadata.TypedValue<?> |
addVariable(String key,
org.mule.runtime.api.metadata.TypedValue<?> value)
Sets a record var
|
Map<String,org.mule.runtime.api.metadata.TypedValue<?>> |
getAllVariables() |
org.mule.runtime.api.metadata.TypedValue<Object> |
getAttributes() |
RecordCompletionTracker |
getCompletionCallback() |
String |
getCurrentStepId()
The id of the
BatchStep which is currently processing this record or is to
process it next |
Exception |
getExceptionForStep(String stepName)
Returns the
Exception found by the step of the given name when processing this record |
int |
getFailedStepsCount()
Returns how many steps have raised exceptions for this record
|
Exception |
getFirstException()
Returns the first
Exception found for this record |
Exception |
getLastException()
Returns the last found
Exception for this record. |
org.mule.runtime.api.metadata.TypedValue<Object> |
getPayload() |
Map<String,Exception> |
getStepExceptions()
|
<T> org.mule.runtime.api.metadata.TypedValue<T> |
getVariable(String key)
Returns the value for the record variable of the given key
|
boolean |
hasErrors()
Returns whether or not this record found errors in any step
|
boolean |
isFailedFor(BatchStep step)
Returns whether this record found an exception for the given
BatchStep |
Record |
markAsFailedInStep(BatchStep step,
Exception e)
Registers that this record found an exception on the given
BatchStep The
given exception will be recoverable through the getStepExceptions() , getExceptionForStep(String) #
methods |
Record |
markAsProcessedByStep(BatchStep step)
Registers that the given
BatchStep has finished processing this record. |
Object |
removeVariable(String key)
Removes the record variable of the given key
|
void |
replaceVariables(Map<String,org.mule.runtime.api.metadata.TypedValue<?>> newVariables) |
void |
setCompletionCallback(RecordCompletionTracker completionCallback) |
void |
setCurrentStepId(String currentStepId) |
void |
setPayload(org.mule.runtime.api.metadata.TypedValue<Object> payload) |
void |
setPayload(org.mule.runtime.api.metadata.TypedValue<Object> payload,
org.mule.runtime.api.metadata.TypedValue<Object> attributes) |
void |
updateWith(org.mule.runtime.core.api.event.CoreEvent event) |
void |
updateWith(RecordELAdapter adapter) |
public Record(org.mule.runtime.api.metadata.TypedValue<Object> payload)
public org.mule.runtime.api.metadata.TypedValue<Object> getPayload()
public org.mule.runtime.api.metadata.TypedValue<Object> getAttributes()
public void setPayload(org.mule.runtime.api.metadata.TypedValue<Object> payload)
public void setPayload(org.mule.runtime.api.metadata.TypedValue<Object> payload, org.mule.runtime.api.metadata.TypedValue<Object> attributes)
public <T> org.mule.runtime.api.metadata.TypedValue<T> getVariable(String key)
key - null if the record var didn't existpublic Object removeVariable(String key)
key - the variable keynull if the record var didn't existspublic void updateWith(org.mule.runtime.core.api.event.CoreEvent event)
public void updateWith(RecordELAdapter adapter)
public void replaceVariables(Map<String,org.mule.runtime.api.metadata.TypedValue<?>> newVariables)
public Record markAsFailedInStep(BatchStep step, Exception e)
BatchStep The
given exception will be recoverable through the getStepExceptions() , getExceptionForStep(String) #
methodspublic Record markAsProcessedByStep(BatchStep step)
BatchStep has finished processing this record. No
assumption is to be made on wether the execution was successful or notstep - a BatchSteppublic int getFailedStepsCount()
public Exception getExceptionForStep(String stepName)
Exception found by the step of the given name when processing this recordpublic Map<String,Exception> getStepExceptions()
Map in which the key is the new of a
BatchStep and the value is an exception found in that step for the this
record.
This map value is never going to be null. There will be no entries for steps in which the this record hasn't
failed.Map which might be empty but will never be nullpublic Exception getFirstException()
Exception found for this recordException or null if this record hasn't find any exceptionpublic Exception getLastException()
Exception for this record.Exception or null if this record hasn't find any exceptionpublic org.mule.runtime.api.metadata.TypedValue<?> addVariable(String key, org.mule.runtime.api.metadata.TypedValue<?> value)
key - the variable keyvalue - the variable valuenull if that variable didn't existpublic boolean hasErrors()
hasErrors in interface com.mulesoft.mule.runtime.module.batch.api.record.RecordWithErrorstrue or falsepublic boolean isFailedFor(BatchStep step)
BatchStepstep - a BatchSteptrue or falsepublic String getCurrentStepId()
BatchStep which is currently processing this record or is to
process it nextString not empty nor nullpublic void setCurrentStepId(String currentStepId)
public RecordCompletionTracker getCompletionCallback()
public void setCompletionCallback(RecordCompletionTracker completionCallback)
Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.