public abstract class AbstractBatchQueueDelegate extends Object implements BatchQueueDelegate
BatchQueueDelegate| Modifier and Type | Field and Description |
|---|---|
protected BatchJobInstanceAdapter |
jobInstance |
| Constructor and Description |
|---|
AbstractBatchQueueDelegate(BatchJobInstanceAdapter jobInstance,
org.mule.runtime.core.api.util.queue.QueueManager queueManager,
long queueTimeout,
org.mule.runtime.api.serialization.ObjectSerializer serializer,
org.mule.runtime.core.api.MuleContext muleContext) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract String |
buildQueueName()
Implementors uses this method to construct the name of the underlying queue
|
void |
dispatch(BatchTransactionContext ctx,
Collection<Record> records)
Writes the given records into the queue
|
void |
dispatchAndCommit(BatchTransactionContext ctx,
BatchJobInstanceAdapter jobInstance,
List<Record> records,
BatchContextTransactionManager manager)
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
|
protected final BatchJobInstanceAdapter jobInstance
public AbstractBatchQueueDelegate(BatchJobInstanceAdapter jobInstance, org.mule.runtime.core.api.util.queue.QueueManager queueManager, long queueTimeout, org.mule.runtime.api.serialization.ObjectSerializer serializer, org.mule.runtime.core.api.MuleContext muleContext)
public void dispatch(BatchTransactionContext ctx, Collection<Record> records) throws org.mule.runtime.api.exception.MuleException
dispatch in interface BatchQueueDelegatectx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onrecords - a list of Recordorg.mule.runtime.api.exception.MuleExceptionpublic void dispatchAndCommit(BatchTransactionContext ctx, BatchJobInstanceAdapter jobInstance, List<Record> records, BatchContextTransactionManager manager)
BatchQueueDelegatedispatchAndCommit in interface BatchQueueDelegatectx - a BatchTransactionContext which links to the transaction existing on the queue to be written onjobInstance - a job instancerecords - a list of Recordmanager - performs logic associated with batch transactionpublic List<Record> poll(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
Recordpoll in interface BatchQueueDelegatectx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onRecordsorg.mule.runtime.api.exception.MuleExceptionpublic long size(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
size in interface BatchQueueDelegatectx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onorg.mule.runtime.api.exception.MuleExceptionpublic Iterator<List<Record>> iterator(BatchTransactionContext ctx) throws org.mule.runtime.api.exception.MuleException
BatchQueueDelegateIterator to access the contents of the queue. Notice that each invocation to
Iterator.next() will actually remove the item from the underlying Queueiterator in interface BatchQueueDelegatectx - a BatchTransactionContext which links to the
transaction existing on the queue to be written onRecordorg.mule.runtime.api.exception.MuleExceptionpublic void dispose(BatchTransactionContext ctx)
Queues for the given
BatchJobInstanceAdapterdispose in interface BatchQueueDelegatectx - a non null BatchTransactionContextpublic final String getQueueName()
Queue's namegetQueueName in interface BatchQueueDelegateStringCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.