|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.axonframework.commandhandling.disruptor.CommandHandlingEntry
public class CommandHandlingEntry
DataHolder for the DisruptorCommandBus. The CommandHandlingEntry maintains all information required for or produced by the command handling process.
Nested Class Summary | |
---|---|
static class |
CommandHandlingEntry.Factory
Factory class for CommandHandlingEntry instances. |
Constructor Summary | |
---|---|
CommandHandlingEntry(boolean transactional)
Initializes the CommandHandlingEntry |
Method Summary | |
---|---|
Object |
getAggregateIdentifier()
Returns the identifier of the aggregate to recover. |
BlacklistDetectingCallback |
getCallback()
Returns the CommandCallback instance for the executed command. |
CommandMessage<?> |
getCommand()
Returns the CommandMessage to be executed. |
Throwable |
getExceptionResult()
Returns the exception that occurred while processing the incoming command, or null if
processing did not result in an exception or if execution is not yet finished. |
InterceptorChain |
getInvocationInterceptorChain()
Returns the InterceptorChain for the invocation process registered with this entry, or null if none
is available. |
int |
getInvokerId()
Returns the Identifier of the invoker that is chosen to handle this entry. |
int |
getPublisherId()
Returns the Identifier of the publisher that is chosen to handle this entry. |
InterceptorChain |
getPublisherInterceptorChain()
Returns the InterceptorChain for the publication process registered with this entry, or null if
none
is available. |
Object |
getResult()
Returns the result of the command's execution, or null if the command is not yet executed or
resulted in an exception. |
int |
getSerializerSegmentId()
Returns the Segment ID that identifies the serializer thread to process this entry |
DisruptorUnitOfWork |
getUnitOfWork()
Returns the UnitOfWork for the command execution. |
boolean |
isRecoverEntry()
Indicates whether this entry is a recovery entry. |
void |
reset(CommandMessage<?> newCommand,
CommandHandler newCommandHandler,
int newInvokerSegmentId,
int newPublisherSegmentId,
int newSerializerSegmentId,
BlacklistDetectingCallback newCallback,
List<CommandHandlerInterceptor> invokerInterceptors,
List<CommandHandlerInterceptor> publisherInterceptors)
Resets this entry, preparing it for use for another command. |
void |
resetAsRecoverEntry(Object newAggregateIdentifier)
Resets this entry, preparing it for use as a recovery entry. |
void |
setExceptionResult(Throwable exceptionResult)
Registers the exception that occurred while processing the incoming command. |
void |
setResult(Object result)
Registers the result of the command's execution, if successful. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CommandHandlingEntry(boolean transactional)
transactional
- Whether this entry contains transactional Unit of WorkMethod Detail |
---|
public CommandMessage<?> getCommand()
public InterceptorChain getInvocationInterceptorChain()
null
if none
is available.
public InterceptorChain getPublisherInterceptorChain()
null
if
none
is available.
public DisruptorUnitOfWork getUnitOfWork()
public void setExceptionResult(Throwable exceptionResult)
exceptionResult
- the exception that occurred while processing the incoming commandpublic Throwable getExceptionResult()
null
if
processing did not result in an exception or if execution is not yet finished.
public void setResult(Object result)
result
- the result of the command's execution, if successfulpublic Object getResult()
null
if the command is not yet executed or
resulted in an exception.
public BlacklistDetectingCallback getCallback()
public boolean isRecoverEntry()
true
, this entry does not contain any
command
handling information.
true
if this entry represents a recovery request, otherwise false
.public Object getAggregateIdentifier()
null
when isRecoverEntry()
returns false
.
public int getInvokerId()
public int getSerializerSegmentId()
public int getPublisherId()
public void reset(CommandMessage<?> newCommand, CommandHandler newCommandHandler, int newInvokerSegmentId, int newPublisherSegmentId, int newSerializerSegmentId, BlacklistDetectingCallback newCallback, List<CommandHandlerInterceptor> invokerInterceptors, List<CommandHandlerInterceptor> publisherInterceptors)
newCommand
- The new command the entry is used fornewCommandHandler
- The Command Handler responsible for handling newCommand
newInvokerSegmentId
- The SegmentID of the invoker that should process this entrynewPublisherSegmentId
- The SegmentID of the publisher that should process this entrynewSerializerSegmentId
- The SegmentID of the serializer that should process this entrynewCallback
- The callback to report the result of command execution toinvokerInterceptors
- The interceptors to invoke during the command handler invocation phasepublisherInterceptors
- The interceptors to invoke during the publication phasepublic void resetAsRecoverEntry(Object newAggregateIdentifier)
newAggregateIdentifier
- The identifier of the aggregate to recover
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |