public abstract class AggregatorRecordBuffer extends InMemoryRecordBuffer
RecordBuffer to be used by DefaultBatchStepAggregator instances.| Modifier and Type | Field and Description |
|---|---|
protected BatchEngine |
batchEngine |
protected StepExceptionReporter |
exceptionReporter |
protected org.mule.runtime.core.api.MuleContext |
muleContext |
protected org.mule.runtime.api.notification.NotificationDispatcher |
notificationDispatcher |
protected BatchStepAdapter |
step |
| Constructor and Description |
|---|
AggregatorRecordBuffer(String name,
int size,
BatchEngine batchEngine,
BatchStepAdapter step,
org.mule.runtime.core.api.processor.Processor chain,
org.mule.runtime.api.component.location.ComponentLocation location,
org.mule.runtime.api.notification.NotificationDispatcher notificationDispatcher,
org.mule.runtime.core.api.MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.mule.runtime.core.api.event.CoreEvent |
configureChainEvent(org.mule.runtime.core.api.event.CoreEvent event,
BatchJobInstanceAdapter jobInstance,
com.google.common.collect.Multimap<BatchTransactionContext,Record> records)
Configures the
event (set payload, properties, etc) to is going to be used when flushing the aggregated records
through the chain |
protected void |
doFlush(BatchJobInstanceAdapter jobInstance,
com.google.common.collect.Multimap<BatchTransactionContext,Record> records)
Executes the template returned by
makeProcessingTemplate(com.google.common.collect.Multimap, Processor, MuleContext)
using the CoreEvent returned by configureChainEvent(CoreEvent, BatchJobInstanceAdapter, Multimap) |
protected org.mule.runtime.api.component.location.ComponentLocation |
getLocation() |
protected abstract BatchProcessingTemplate |
makeProcessingTemplate(com.google.common.collect.Multimap<BatchTransactionContext,Record> records,
org.mule.runtime.core.api.processor.Processor processor,
org.mule.runtime.core.api.MuleContext muleContext)
Returns the
BatchProcessingTemplate through which chain will be executed |
protected void |
markError(BatchJobInstanceAdapter jobInstance,
List<Record> records,
Exception e)
Sets the records as failed in this step
|
void |
setExceptionReporter(StepExceptionReporter exceptionReporter) |
add, flush, flushAndForget, forget, getHolderLock, sizeadd, getNameprotected final org.mule.runtime.core.api.MuleContext muleContext
protected final BatchEngine batchEngine
protected final BatchStepAdapter step
protected StepExceptionReporter exceptionReporter
protected final org.mule.runtime.api.notification.NotificationDispatcher notificationDispatcher
public AggregatorRecordBuffer(String name, int size, BatchEngine batchEngine, BatchStepAdapter step, org.mule.runtime.core.api.processor.Processor chain, org.mule.runtime.api.component.location.ComponentLocation location, org.mule.runtime.api.notification.NotificationDispatcher notificationDispatcher, org.mule.runtime.core.api.MuleContext muleContext)
protected void doFlush(BatchJobInstanceAdapter jobInstance, com.google.common.collect.Multimap<BatchTransactionContext,Record> records)
makeProcessingTemplate(com.google.common.collect.Multimap, Processor, MuleContext)
using the CoreEvent returned by configureChainEvent(CoreEvent, BatchJobInstanceAdapter, Multimap)doFlush in class InMemoryRecordBufferjobInstance - a BatchJobInstanceAdapterrecords - a Multimap relating a
BatchTransactionContext to its
corresponding buffered Recordsprotected abstract org.mule.runtime.core.api.event.CoreEvent configureChainEvent(org.mule.runtime.core.api.event.CoreEvent event,
BatchJobInstanceAdapter jobInstance,
com.google.common.collect.Multimap<BatchTransactionContext,Record> records)
throws org.mule.runtime.api.exception.MuleException
event (set payload, properties, etc) to is going to be used when flushing the aggregated records
through the chainevent - a CoreEventjobInstance - the BatchJobInstanceAdapter being executedrecords - the aggregated RecordsCoreEvent or null, which means that the chain should be skipped for this eventorg.mule.runtime.api.exception.MuleException - if anything goes wrongprotected abstract BatchProcessingTemplate makeProcessingTemplate(com.google.common.collect.Multimap<BatchTransactionContext,Record> records, org.mule.runtime.core.api.processor.Processor processor, org.mule.runtime.core.api.MuleContext muleContext)
BatchProcessingTemplate through which chain will be executedrecords - the aggregated Recordsprocessor - the Processor to be executedmuleContext - the current MuleContextprotected void markError(BatchJobInstanceAdapter jobInstance, List<Record> records, Exception e)
jobInstance - a BatchJobInstanceAdapterrecords - a List of Recordse - a Exceptionpublic void setExceptionReporter(StepExceptionReporter exceptionReporter)
protected org.mule.runtime.api.component.location.ComponentLocation getLocation()
Copyright © 2006–2022 MuleSoft, Inc.. All rights reserved.