public interface BatchQueueDelegate
Queue from the queue itself.
This interface allows different clients to perform common operations without the need to know which queue is actually being
manipulated| Modifier and Type | Method and Description |
|---|---|
void |
dispatch(BatchTransactionContext ctx,
Collection<Record> records)
Writes the given records into the queue
|
void |
dispatchAndCommit(BatchTransactionContext ctx,
BatchJobInstanceAdapter jobInstance,
List<Record> records,
BatchContextTransactionManager committer)
Writes the given records into the queue and commits the transaction
|
void |
dispose(BatchTransactionContext ctx)
Disposes the underlying
Queues for the given
BatchJobInstanceAdapter |
String |
getQueueName()
Returns the underlying
Queue's name |
Iterator<List<Record>> |
iterator(BatchTransactionContext ctx)
Returns a streaming
Iterator to access the contents of the queue. |
List<Record> |
poll(BatchTransactionContext ctx)
Retrieves a block of
Record |
long |
size(BatchTransactionContext ctx)
Returns the size of the underlying queue
|
void dispatchAndCommit(BatchTransactionContext ctx, BatchJobInstanceAdapter jobInstance, List<Record> records, BatchContextTransactionManager committer)
ctx - a BatchTransactionContext which links to the transaction existing on the queue to be written onjobInstance - a job instancerecords - a list of Recordcommitter - performs logic associated with batch transactionvoid dispatch(BatchTransactionContext ctx, Collection<Record> records) throws org.mule.runtime.api.exception.MuleException
ctx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onrecords - a list of Recordorg.mule.runtime.api.exception.MuleExceptionList<Record> poll(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
Recordctx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onRecordsorg.mule.runtime.api.exception.MuleExceptionlong size(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
ctx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onorg.mule.runtime.api.exception.MuleExceptionIterator<List<Record>> iterator(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
Iterator to access the contents of the queue. Notice that each invocation to
Iterator.next() will actually remove the item from the underlying Queuectx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onRecordorg.mule.runtime.api.exception.MuleExceptionvoid dispose(BatchTransactionContext ctx)
Queues for the given
BatchJobInstanceAdapterctx - a non null BatchTransactionContextCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.