public class DefaultBatchTransactionContextFactory extends Object implements BatchTransactionContextFactory
BatchTransactionContextFactory| Constructor and Description |
|---|
DefaultBatchTransactionContextFactory(BatchEngine batchEngine) |
| Modifier and Type | Method and Description |
|---|---|
void |
closeAndRollback()
closes this factory meaning that it will not accept requests to create any addiitional
BatchTransactionContexts. |
int |
countOpenTransactions()
For monitoring and testing purposes only
|
BatchTransactionContext |
createTransactionContext(BatchJobInstanceAdapter jobInstance)
Creates and tracks a new
BatchTransactionContext associated
to the given BatchJobInstanceAdapter |
int |
getTrackedContextsCount()
For monitoring purposes
|
public DefaultBatchTransactionContextFactory(BatchEngine batchEngine)
public int getTrackedContextsCount()
public BatchTransactionContext createTransactionContext(BatchJobInstanceAdapter jobInstance)
BatchTransactionContext associated
to the given BatchJobInstanceAdaptercreateTransactionContext in interface BatchTransactionContextFactoryjobInstance - a not null BatchJobInstanceAdapterBatchTransactionContextpublic void closeAndRollback()
BatchTransactionContexts. If
BatchTransactionContextFactory.createTransactionContext(com.mulesoft.mule.runtime.module.batch.engine.BatchJobInstanceAdapter) is invoked after
this method it will throw IllegalStateException. Any active transactions that hasn't been rolled back or
commit at the moment of invoking this method will be automatically rolled back. This method is thread safe and can be safely
invoked multiple timescloseAndRollback in interface BatchTransactionContextFactorypublic int countOpenTransactions()
BatchTransactionContextFactorycountOpenTransactions in interface BatchTransactionContextFactoryBatchTransactionContext instances have
been created but not closed yetCopyright © 2006–2022 MuleSoft, Inc.. All rights reserved.