|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.commandhandling.disruptor.CommandHandlerInvoker
public class CommandHandlerInvoker
Component of the DisruptorCommandBus that invokes the command handler. The execution is done within a Unit Of Work. If an aggregate has been pre-loaded, it is set to the ThreadLocal.
| Constructor Summary | |
|---|---|
CommandHandlerInvoker(EventStore eventStore,
Cache cache,
int segmentId)
Create an aggregate invoker instance that uses the given eventStore and cache to
retrieve aggregate instances. |
|
| Method Summary | ||
|---|---|---|
|
createRepository(AggregateFactory<T> aggregateFactory,
EventStreamDecorator decorator)
Create a repository instance for an aggregate created by the given aggregateFactory. |
|
static
|
getRepository(String typeIdentifier)
Returns the Repository instance for Aggregate with given typeIdentifier used by the
CommandHandlerInvoker that is running on the current thread. |
|
void |
onEvent(CommandHandlingEntry entry,
long sequence,
boolean endOfBatch)
|
|
void |
onShutdown()
|
|
void |
onStart()
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CommandHandlerInvoker(EventStore eventStore,
Cache cache,
int segmentId)
eventStore and cache to
retrieve aggregate instances.
eventStore - The event store providing access to events to reconstruct aggregatescache - The cache temporarily storing aggregate instancessegmentId - The id of the segment this invoker should handle| Method Detail |
|---|
public static <T extends EventSourcedAggregateRoot> org.axonframework.commandhandling.disruptor.CommandHandlerInvoker.DisruptorRepository<T> getRepository(String typeIdentifier)
typeIdentifier used by the
CommandHandlerInvoker that is running on the current thread.
Calling this method from any other thread will return null.
T - The type of aggregatetypeIdentifier - The type identifier of the aggregate
public void onEvent(CommandHandlingEntry entry,
long sequence,
boolean endOfBatch)
throws Exception
onEvent in interface com.lmax.disruptor.EventHandler<CommandHandlingEntry>Exception
public <T extends EventSourcedAggregateRoot> Repository<T> createRepository(AggregateFactory<T> aggregateFactory,
EventStreamDecorator decorator)
aggregateFactory. The returning
repository must be sage to use by this invoker instance.
T - The type of aggregate created by the factoryaggregateFactory - The factory creating aggregate instancesdecorator - The decorator to decorate event streams with
public void onStart()
onStart in interface com.lmax.disruptor.LifecycleAwarepublic void onShutdown()
onShutdown in interface com.lmax.disruptor.LifecycleAware
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||