KP - public abstract class AbstractTransactionalProcessor<KP> extends Object
| Modifier and Type | Class and Description |
|---|---|
protected class |
AbstractTransactionalProcessor.SimpleTransactionPropagation
Propagates transaction object AS-IS
|
protected static interface |
AbstractTransactionalProcessor.TransactionPropagation
Interface to propagate transactions between threads.
|
| Modifier and Type | Field and Description |
|---|---|
protected ThreadLocal<Transaction> |
threadTransaction |
| Modifier | Constructor and Description |
|---|---|
protected |
AbstractTransactionalProcessor(ExecutorService executorService) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract Transaction |
beginTransaction()
Concrete implementations begin transaction and return transaction instance.
|
protected MutableContext |
createContext(ExecutionContext<KP> owner,
Context... chain)
Creates mutable context for execution context.
|
protected ProgressMonitor |
createProgressMonitor(String name) |
PropertySet<KP> |
createPropertySet(Context context,
PropertySet<KP>... chain) |
protected abstract PropertySet<KP> |
createPropertySet(ExecutorService executorService,
Context context,
PropertySet<KP>... chain) |
protected AbstractTransactionalProcessor.TransactionPropagation |
createTransactionPropagation(Transaction transaction)
Creates transaction propagation.
|
Transaction |
getCurrentTransaction() |
<V> V |
process(Command<KP,V> command,
Context context,
PropertySet<KP> propertySet,
Object... args)
Transactionally processes the command.
|
protected void |
registerXAResource(String uniqueId,
XAResource xaResource) |
void |
setProgressMonitorFactory(ProgressMonitorFactory progressMonitorFactory) |
protected void |
unregisterXAResource(String uniqueId,
XAResource xaResource) |
protected ThreadLocal<Transaction> threadTransaction
protected AbstractTransactionalProcessor(ExecutorService executorService)
protected AbstractTransactionalProcessor.TransactionPropagation createTransactionPropagation(Transaction transaction)
transaction - public Transaction getCurrentTransaction()
protected abstract PropertySet<KP> createPropertySet(ExecutorService executorService, Context context, PropertySet<KP>... chain)
public PropertySet<KP> createPropertySet(Context context, PropertySet<KP>... chain)
public void setProgressMonitorFactory(ProgressMonitorFactory progressMonitorFactory)
protected ProgressMonitor createProgressMonitor(String name)
protected abstract Transaction beginTransaction() throws NotSupportedException, SystemException
NotSupportedExceptionSystemExceptionprotected void registerXAResource(String uniqueId, XAResource xaResource)
protected void unregisterXAResource(String uniqueId, XAResource xaResource)
public <V> V process(Command<KP,V> command, Context context, PropertySet<KP> propertySet, Object... args) throws Exception
command - Exceptionprotected MutableContext createContext(ExecutionContext<KP> owner, Context... chain)
owner - chain -