public abstract class DisruptorUnitOfWork<T extends org.axonframework.messaging.Message<?>>
extends org.axonframework.messaging.unitofwork.AbstractUnitOfWork<T>
DisruptorCommandBus. It expects the executing command message to
target a single aggregate instance.| Constructor and Description |
|---|
DisruptorUnitOfWork() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
addHandler(org.axonframework.messaging.unitofwork.UnitOfWork.Phase phase,
Consumer<org.axonframework.messaging.unitofwork.UnitOfWork<T>> handler) |
<R> org.axonframework.messaging.ResultMessage<R> |
executeWithResult(Callable<R> task,
org.axonframework.messaging.unitofwork.RollbackConfiguration rollbackConfiguration)
This feature is not supported by this Unit of Work.
|
org.axonframework.messaging.unitofwork.ExecutionResult |
getExecutionResult() |
T |
getMessage() |
protected void |
notifyHandlers(org.axonframework.messaging.unitofwork.UnitOfWork.Phase phase) |
Optional<org.axonframework.messaging.unitofwork.UnitOfWork<?>> |
parent() |
void |
pause()
Pause this Unit of Work by unregistering it with the
CurrentUnitOfWork. |
void |
reset(T message)
Resets the state of this Unit of Work, by setting its phase to
NOT_STARTED, replacing the message
of this Unit of Work with given message, and clearing its collection of registered handlers. |
void |
resume()
Resume a paused Unit of Work by registering it with the
CurrentUnitOfWork. |
protected void |
setExecutionResult(org.axonframework.messaging.unitofwork.ExecutionResult executionResult) |
protected void |
setRollbackCause(Throwable cause) |
org.axonframework.messaging.unitofwork.UnitOfWork<T> |
transformMessage(Function<T,? extends org.axonframework.messaging.Message<?>> transformOperator) |
afterCommit, changePhase, commit, correlationDataProviders, getCorrelationData, isRolledBack, onCleanup, onCommit, onPrepareCommit, onRollback, phase, registerCorrelationDataProvider, resources, rollback, setPhase, startpublic void reset(T message)
NOT_STARTED, replacing the message
of this Unit of Work with given message, and clearing its collection of registered handlers.message - the new Message that is about to be processed.public void pause()
CurrentUnitOfWork. This will detach it from the
current thread.public void resume()
CurrentUnitOfWork. This will attach it to the
current thread again.public Optional<org.axonframework.messaging.unitofwork.UnitOfWork<?>> parent()
public T getMessage()
public org.axonframework.messaging.unitofwork.UnitOfWork<T> transformMessage(Function<T,? extends org.axonframework.messaging.Message<?>> transformOperator)
protected void notifyHandlers(org.axonframework.messaging.unitofwork.UnitOfWork.Phase phase)
notifyHandlers in class org.axonframework.messaging.unitofwork.AbstractUnitOfWork<T extends org.axonframework.messaging.Message<?>>protected void addHandler(org.axonframework.messaging.unitofwork.UnitOfWork.Phase phase,
Consumer<org.axonframework.messaging.unitofwork.UnitOfWork<T>> handler)
addHandler in class org.axonframework.messaging.unitofwork.AbstractUnitOfWork<T extends org.axonframework.messaging.Message<?>>protected void setExecutionResult(org.axonframework.messaging.unitofwork.ExecutionResult executionResult)
setExecutionResult in class org.axonframework.messaging.unitofwork.AbstractUnitOfWork<T extends org.axonframework.messaging.Message<?>>protected void setRollbackCause(Throwable cause)
setRollbackCause in class org.axonframework.messaging.unitofwork.AbstractUnitOfWork<T extends org.axonframework.messaging.Message<?>>public <R> org.axonframework.messaging.ResultMessage<R> executeWithResult(Callable<R> task, org.axonframework.messaging.unitofwork.RollbackConfiguration rollbackConfiguration)
public org.axonframework.messaging.unitofwork.ExecutionResult getExecutionResult()
Copyright © 2010–2019. All rights reserved.