public class FixedAggregatorTransactionRecordBuffer extends AggregatorRecordBuffer
AggregatorRecordBuffer for non streaming DefaultBatchStepAggregator. This buffer works with
in memory Record blocks of a fixed sizebatchEngine, exceptionReporter, muleContext, notificationDispatcher, step| Constructor and Description |
|---|
FixedAggregatorTransactionRecordBuffer(int blockSize,
boolean preserveMimeTypes,
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 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 AggregatorRecordBuffer.chain |
void |
flushAndForget(BatchJobInstanceAdapter jobInstance)
|
void |
forget(BatchJobInstanceAdapter jobInstance)
For this implementation, to forget means to flush whatever records are currently buffered.
|
protected BatchProcessingTemplate |
makeProcessingTemplate(com.google.common.collect.Multimap<BatchTransactionContext,Record> contexts,
org.mule.runtime.core.api.processor.Processor processor,
org.mule.runtime.core.api.MuleContext muleContext)
Returns the
BatchProcessingTemplate through which AggregatorRecordBuffer.chain will be executed |
long |
size(BatchJobInstanceAdapter jobInstance)
Returns how many records are buffered for the given
BatchJobInstanceAdapter |
doFlush, getLocation, markError, setExceptionReporteradd, flush, getHolderLockadd, getNamepublic FixedAggregatorTransactionRecordBuffer(int blockSize,
boolean preserveMimeTypes,
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)
public void forget(BatchJobInstanceAdapter jobInstance)
forget in interface RecordBufferforget in class InMemoryRecordBufferjobInstance - the BatchJobInstanceAdapter owning the recordsprotected 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)
AggregatorRecordBufferevent (set payload, properties, etc) to is going to be used when flushing the aggregated records
through the AggregatorRecordBuffer.chainconfigureChainEvent in class AggregatorRecordBufferevent - a CoreEventjobInstance - the BatchJobInstanceAdapter being executedrecords - the aggregated RecordsCoreEvent or null, which means that the chain should be skipped for this eventprotected BatchProcessingTemplate makeProcessingTemplate(com.google.common.collect.Multimap<BatchTransactionContext,Record> contexts, org.mule.runtime.core.api.processor.Processor processor, org.mule.runtime.core.api.MuleContext muleContext)
AggregatorRecordBufferBatchProcessingTemplate through which AggregatorRecordBuffer.chain will be executedmakeProcessingTemplate in class AggregatorRecordBuffercontexts - the aggregated Recordsprocessor - the Processor to be executedmuleContext - the current MuleContextpublic long size(BatchJobInstanceAdapter jobInstance)
InMemoryRecordBufferBatchJobInstanceAdaptersize in interface RecordBuffersize in class InMemoryRecordBufferjobInstance - a BatchJobInstanceAdapterpublic void flushAndForget(BatchJobInstanceAdapter jobInstance)
InMemoryRecordBufferInMemoryRecordBuffer.flush(com.mulesoft.mule.runtime.module.batch.engine.BatchJobInstanceAdapter) followed by a
InMemoryRecordBuffer.forget(com.mulesoft.mule.runtime.module.batch.engine.BatchJobInstanceAdapter).
You MUST use this method when you know that the given jobInstance will no longer be executed in order to avoid a
memory leak on its tracking information
This is NOT a thread-safe operation. You must be careful to not have several threads invoking this method at the same
time for the same BatchJobInstanceAdapterflushAndForget in interface RecordBufferflushAndForget in class InMemoryRecordBufferjobInstance - a BatchJobInstanceAdapter which you no longer need
to trackCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.