public interface RecordBuffer
extends org.mule.runtime.api.meta.NamedObject
int add(BatchJobInstanceAdapter jobInstance, BatchTransactionContextProvider ctxProvider, Record record)
add(com.mulesoft.mule.runtime.module.batch.engine.BatchJobInstanceAdapter, com.mulesoft.mule.runtime.module.batch.engine.transaction.BatchTransactionContext, Record)
using the BatchTransactionContext returned by the context
providerjobInstance - a BatchJobInstanceAdapterctxProvider - a BatchTransactionContextProviderrecord - a Recordint add(BatchJobInstanceAdapter jobInstance, BatchTransactionContext ctx, Record record)
Record for the given BatchJobInstanceAdapterjobInstance - a BatchJobInstanceAdapterrecord - a Recordvoid flush(BatchJobInstanceAdapter jobInstance)
Records for the given
BatchJobInstanceAdapter.
Use this method when you want to flush the info but you still expect more records from the same job instance to come. In this
way, you flush the records but you avoid constantly recreating the internal tracking information.
This is a thread-safe operation.jobInstance - the BatchJobInstanceAdapter which records you want
flushedvoid flushAndForget(BatchJobInstanceAdapter jobInstance)
flush(com.mulesoft.mule.runtime.module.batch.engine.BatchJobInstanceAdapter) followed by a
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 BatchJobInstanceAdapterjobInstance - a BatchJobInstanceAdapter which you no longer need
to trackvoid forget(BatchJobInstanceAdapter jobInstance)
BatchJobInstanceAdapterjobInstance - a BatchJobInstanceAdapter which you no longer need
to tracklong size(BatchJobInstanceAdapter jobInstance)
BatchJobInstanceAdapterjobInstance - a BatchJobInstanceAdapterCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.