test_class.file: server/src/test/java/io/spine/server/aggregate/AggregateRepositoryTest.java
test_class.identifier: AggregateRepositoryTest
test_case.body: @Test
      @DisplayName("do nothing when event reaction fails")
      @MuteLogging
      void doNothingWhenEventReactionFails() {
          FailingAggregateRepository repository = new FailingAggregateRepository();
          BoundedContext.InternalAccess contextAccess = context().internalAccess();
          contextAccess.register(repository);
          DiagnosticMonitor monitor = new DiagnosticMonitor();
          contextAccess.registerEventDispatcher(monitor);
  
          TestEventFactory factory = TestEventFactory.newInstance(getClass());
  
          // Passing negative float value should cause an exception.
          EventEnvelope envelope =
                  EventEnvelope.of(factory.createEvent(FloatEncountered.newBuilder()
                                                                       .setNumber(-412.0f)
                                                                       .build()));
          context().eventBus()
                   .post(envelope.outerObject());
  
          List<HandlerFailedUnexpectedly> handlerFailureEvents = monitor.handlerFailureEvents();
          assertThat(handlerFailureEvents).hasSize(1);
          HandlerFailedUnexpectedly event = handlerFailureEvents.get(0);
          assertThat(event.getHandledSignal()).isEqualTo(envelope.messageId());
          assertThat(event.getEntity()
                          .getTypeUrl())
                  .isEqualTo(repository.entityStateType()
                                       .value());
          assertThat(event.getError()
                          .getType())
                  .isEqualTo(IllegalArgumentException.class.getCanonicalName());
      }
test_case.class_method_signature: AggregateRepositoryTest.doNothingWhenEventReactionFails()
test_case.full_signature: @Test @DisplayName("do nothing when event reaction fails") @MuteLogging void doNothingWhenEventReactionFails()
test_case.identifier: doNothingWhenEventReactionFails
test_case.invocations: internalAccess context register registerEventDispatcher newInstance getClass of createEvent build setNumber newBuilder post eventBus context outerObject handlerFailureEvents hasSize assertThat get isEqualTo assertThat getHandledSignal messageId isEqualTo assertThat getTypeUrl getEntity value entityStateType isEqualTo assertThat getType getError getCanonicalName
test_case.modifiers: @Test @DisplayName("do nothing when event reaction fails") @MuteLogging
test_case.parameters: ()
test_case.return: void
test_case.signature: void doNothingWhenEventReactionFails()
focal_class.declarator: DEFAULT_SNAPSHOT_TRIGGER = 100
focal_class.modifier: static final
focal_class.original_string: static final int DEFAULT_SNAPSHOT_TRIGGER = 100;
focal_class.type: int
focal_class.var_name: DEFAULT_SNAPSHOT_TRIGGER
focal_class.declarator: commandRouting
focal_class.modifier: private final
focal_class.original_string: private final Supplier<CommandRouting<I>> commandRouting;
focal_class.type: Supplier<CommandRouting<I>>
focal_class.var_name: commandRouting
focal_class.declarator: eventRouting
focal_class.modifier: private final
focal_class.original_string: private final EventRouting<I> eventRouting;
focal_class.type: EventRouting<I>
focal_class.var_name: eventRouting
focal_class.declarator: eventImportRouting
focal_class.modifier: private final
focal_class.original_string: private final EventRouting<I> eventImportRouting;
focal_class.type: EventRouting<I>
focal_class.var_name: eventImportRouting
focal_class.declarator: inbox
focal_class.modifier: private @MonotonicNonNull
focal_class.original_string: private @MonotonicNonNull Inbox<I> inbox;
focal_class.type: Inbox<I>
focal_class.var_name: inbox
focal_class.declarator: cache
focal_class.modifier: private @MonotonicNonNull
focal_class.original_string: private @MonotonicNonNull RepositoryCache<I, A> cache;
focal_class.type: RepositoryCache<I, A>
focal_class.var_name: cache
focal_class.declarator: snapshotTrigger = DEFAULT_SNAPSHOT_TRIGGER
focal_class.modifier: private
focal_class.original_string: private int snapshotTrigger = DEFAULT_SNAPSHOT_TRIGGER;
focal_class.type: int
focal_class.var_name: snapshotTrigger
focal_class.file: server/src/main/java/io/spine/server/aggregate/AggregateRepository.java
focal_class.identifier: AggregateRepository
focal_class.interfaces: implements CommandDispatcher, EventProducingRepository, EventDispatcherDelegate
focal_class.class_method_signature: AggregateRepository.AggregateRepository()
focal_class.full_signature: protected  AggregateRepository()
focal_class.identifier: AggregateRepository
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.signature:  AggregateRepository()
focal_class.class_method_signature: AggregateRepository.registerWith(BoundedContext context)
focal_class.full_signature: @Override @OverridingMethodsMustInvokeSuper public void registerWith(BoundedContext context)
focal_class.identifier: registerWith
focal_class.modifiers: @Override @OverridingMethodsMustInvokeSuper public
focal_class.parameters: (BoundedContext context)
focal_class.return: void
focal_class.signature: void registerWith(BoundedContext context)
focal_class.class_method_signature: AggregateRepository.eventBus()
focal_class.full_signature: @Override public final EventBus eventBus()
focal_class.identifier: eventBus
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: EventBus
focal_class.signature: EventBus eventBus()
focal_class.class_method_signature: AggregateRepository.initCache(boolean multitenant)
focal_class.full_signature: private void initCache(boolean multitenant)
focal_class.identifier: initCache
focal_class.modifiers: private
focal_class.parameters: (boolean multitenant)
focal_class.return: void
focal_class.signature: void initCache(boolean multitenant)
focal_class.class_method_signature: AggregateRepository.initInbox()
focal_class.full_signature: private void initInbox()
focal_class.identifier: initInbox
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initInbox()
focal_class.class_method_signature: AggregateRepository.inbox()
focal_class.full_signature: private Inbox<I> inbox()
focal_class.identifier: inbox
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Inbox<I>
focal_class.signature: Inbox<I> inbox()
focal_class.class_method_signature: AggregateRepository.checkNotVoid()
focal_class.full_signature: private void checkNotVoid()
focal_class.identifier: checkNotVoid
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void checkNotVoid()
focal_class.class_method_signature: AggregateRepository.setupCommandRouting(CommandRouting<I> routing)
focal_class.full_signature: @SuppressWarnings("NoopMethodInAbstractClass") // See Javadoc protected void setupCommandRouting(CommandRouting<I> routing)
focal_class.identifier: setupCommandRouting
focal_class.modifiers: @SuppressWarnings("NoopMethodInAbstractClass") // See Javadoc protected
focal_class.parameters: (CommandRouting<I> routing)
focal_class.return: void
focal_class.signature: void setupCommandRouting(CommandRouting<I> routing)
focal_class.class_method_signature: AggregateRepository.setupEventRouting(EventRouting<I> routing)
focal_class.full_signature: @SuppressWarnings("NoopMethodInAbstractClass") // see Javadoc protected void setupEventRouting(EventRouting<I> routing)
focal_class.identifier: setupEventRouting
focal_class.modifiers: @SuppressWarnings("NoopMethodInAbstractClass") // see Javadoc protected
focal_class.parameters: (EventRouting<I> routing)
focal_class.return: void
focal_class.signature: void setupEventRouting(EventRouting<I> routing)
focal_class.class_method_signature: AggregateRepository.setupImportRouting(EventRouting<I> routing)
focal_class.full_signature: @SuppressWarnings("NoopMethodInAbstractClass") // see Javadoc protected void setupImportRouting(EventRouting<I> routing)
focal_class.identifier: setupImportRouting
focal_class.modifiers: @SuppressWarnings("NoopMethodInAbstractClass") // see Javadoc protected
focal_class.parameters: (EventRouting<I> routing)
focal_class.return: void
focal_class.signature: void setupImportRouting(EventRouting<I> routing)
focal_class.class_method_signature: AggregateRepository.create(I id)
focal_class.full_signature: @Override public A create(I id)
focal_class.identifier: create
focal_class.modifiers: @Override public
focal_class.parameters: (I id)
focal_class.return: A
focal_class.signature: A create(I id)
focal_class.class_method_signature: AggregateRepository.aggregateClass()
focal_class.full_signature: protected final AggregateClass<A> aggregateClass()
focal_class.identifier: aggregateClass
focal_class.modifiers: protected final
focal_class.parameters: ()
focal_class.return: AggregateClass<A>
focal_class.signature: AggregateClass<A> aggregateClass()
focal_class.class_method_signature: AggregateRepository.toModelClass(Class<A> cls)
focal_class.full_signature: @Override protected AggregateClass<A> toModelClass(Class<A> cls)
focal_class.identifier: toModelClass
focal_class.modifiers: @Override protected
focal_class.parameters: (Class<A> cls)
focal_class.return: AggregateClass<A>
focal_class.signature: AggregateClass<A> toModelClass(Class<A> cls)
focal_class.class_method_signature: AggregateRepository.store(A aggregate)
focal_class.full_signature: @Override protected final void store(A aggregate)
focal_class.identifier: store
focal_class.modifiers: @Override protected final
focal_class.parameters: (A aggregate)
focal_class.return: void
focal_class.signature: void store(A aggregate)
focal_class.class_method_signature: AggregateRepository.doStore(A aggregate)
focal_class.full_signature: @VisibleForTesting protected void doStore(A aggregate)
focal_class.identifier: doStore
focal_class.modifiers: @VisibleForTesting protected
focal_class.parameters: (A aggregate)
focal_class.return: void
focal_class.signature: void doStore(A aggregate)
focal_class.class_method_signature: AggregateRepository.createStorage()
focal_class.full_signature: @Override protected AggregateStorage<I> createStorage()
focal_class.identifier: createStorage
focal_class.modifiers: @Override protected
focal_class.parameters: ()
focal_class.return: AggregateStorage<I>
focal_class.signature: AggregateStorage<I> createStorage()
focal_class.class_method_signature: AggregateRepository.messageClasses()
focal_class.full_signature: @Override public final ImmutableSet<CommandClass> messageClasses()
focal_class.identifier: messageClasses
focal_class.modifiers: @Override public final
focal_class.parameters: ()
focal_class.return: ImmutableSet<CommandClass>
focal_class.signature: ImmutableSet<CommandClass> messageClasses()
focal_class.class_method_signature: AggregateRepository.dispatch(CommandEnvelope cmd)
focal_class.full_signature: @Override public final void dispatch(CommandEnvelope cmd)
focal_class.identifier: dispatch
focal_class.modifiers: @Override public final
focal_class.parameters: (CommandEnvelope cmd)
focal_class.return: void
focal_class.signature: void dispatch(CommandEnvelope cmd)
focal_class.class_method_signature: AggregateRepository.route(CommandEnvelope cmd)
focal_class.full_signature: private Optional<I> route(CommandEnvelope cmd)
focal_class.identifier: route
focal_class.modifiers: private
focal_class.parameters: (CommandEnvelope cmd)
focal_class.return: Optional<I>
focal_class.signature: Optional<I> route(CommandEnvelope cmd)
focal_class.class_method_signature: AggregateRepository.onRoutingFailed(SignalEnvelope<?, ?, ?> envelope, Throwable cause)
focal_class.full_signature: @Internal @Override protected final void onRoutingFailed(SignalEnvelope<?, ?, ?> envelope, Throwable cause)
focal_class.identifier: onRoutingFailed
focal_class.modifiers: @Internal @Override protected final
focal_class.parameters: (SignalEnvelope<?, ?, ?> envelope, Throwable cause)
focal_class.return: void
focal_class.signature: void onRoutingFailed(SignalEnvelope<?, ?, ?> envelope, Throwable cause)
focal_class.class_method_signature: AggregateRepository.events()
focal_class.full_signature: @Override public ImmutableSet<EventClass> events()
focal_class.identifier: events
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ImmutableSet<EventClass>
focal_class.signature: ImmutableSet<EventClass> events()
focal_class.class_method_signature: AggregateRepository.domesticEvents()
focal_class.full_signature: @Override public ImmutableSet<EventClass> domesticEvents()
focal_class.identifier: domesticEvents
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ImmutableSet<EventClass>
focal_class.signature: ImmutableSet<EventClass> domesticEvents()
focal_class.class_method_signature: AggregateRepository.externalEvents()
focal_class.full_signature: @Override public ImmutableSet<EventClass> externalEvents()
focal_class.identifier: externalEvents
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ImmutableSet<EventClass>
focal_class.signature: ImmutableSet<EventClass> externalEvents()
focal_class.class_method_signature: AggregateRepository.importableEvents()
focal_class.full_signature: public ImmutableSet<EventClass> importableEvents()
focal_class.identifier: importableEvents
focal_class.modifiers: public
focal_class.parameters: ()
focal_class.return: ImmutableSet<EventClass>
focal_class.signature: ImmutableSet<EventClass> importableEvents()
focal_class.class_method_signature: AggregateRepository.outgoingEvents()
focal_class.full_signature: @Override public ImmutableSet<EventClass> outgoingEvents()
focal_class.identifier: outgoingEvents
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: ImmutableSet<EventClass>
focal_class.signature: ImmutableSet<EventClass> outgoingEvents()
focal_class.class_method_signature: AggregateRepository.dispatchEvent(EventEnvelope event)
focal_class.full_signature: @Override public void dispatchEvent(EventEnvelope event)
focal_class.identifier: dispatchEvent
focal_class.modifiers: @Override public
focal_class.parameters: (EventEnvelope event)
focal_class.return: void
focal_class.signature: void dispatchEvent(EventEnvelope event)
focal_class.class_method_signature: AggregateRepository.route(EventEnvelope event)
focal_class.full_signature: private Set<I> route(EventEnvelope event)
focal_class.identifier: route
focal_class.modifiers: private
focal_class.parameters: (EventEnvelope event)
focal_class.return: Set<I>
focal_class.signature: Set<I> route(EventEnvelope event)
focal_class.class_method_signature: AggregateRepository.importEvent(EventEnvelope event)
focal_class.full_signature: final void importEvent(EventEnvelope event)
focal_class.identifier: importEvent
focal_class.modifiers: final
focal_class.parameters: (EventEnvelope event)
focal_class.return: void
focal_class.signature: void importEvent(EventEnvelope event)
focal_class.class_method_signature: AggregateRepository.routeImport(EventEnvelope event)
focal_class.full_signature: private Optional<I> routeImport(EventEnvelope event)
focal_class.identifier: routeImport
focal_class.modifiers: private
focal_class.parameters: (EventEnvelope event)
focal_class.return: Optional<I>
focal_class.signature: Optional<I> routeImport(EventEnvelope event)
focal_class.class_method_signature: AggregateRepository.eventImportRouting()
focal_class.full_signature: @SuppressWarnings("UnnecessaryLambda") private Route<? extends EventMessage, EventContext, I> eventImportRouting()
focal_class.identifier: eventImportRouting
focal_class.modifiers: @SuppressWarnings("UnnecessaryLambda") private
focal_class.parameters: ()
focal_class.return: Route<? extends EventMessage, EventContext, I>
focal_class.signature: Route<? extends EventMessage, EventContext, I> eventImportRouting()
focal_class.class_method_signature: AggregateRepository.commandRouting()
focal_class.full_signature: private CommandRouting<I> commandRouting()
focal_class.identifier: commandRouting
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: CommandRouting<I>
focal_class.signature: CommandRouting<I> commandRouting()
focal_class.class_method_signature: AggregateRepository.eventRouting()
focal_class.full_signature: private EventRouting<I> eventRouting()
focal_class.identifier: eventRouting
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: EventRouting<I>
focal_class.signature: EventRouting<I> eventRouting()
focal_class.class_method_signature: AggregateRepository.snapshotTrigger()
focal_class.full_signature: protected int snapshotTrigger()
focal_class.identifier: snapshotTrigger
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: int
focal_class.signature: int snapshotTrigger()
focal_class.class_method_signature: AggregateRepository.setSnapshotTrigger(int snapshotTrigger)
focal_class.full_signature: protected void setSnapshotTrigger(int snapshotTrigger)
focal_class.identifier: setSnapshotTrigger
focal_class.modifiers: protected
focal_class.parameters: (int snapshotTrigger)
focal_class.return: void
focal_class.signature: void setSnapshotTrigger(int snapshotTrigger)
focal_class.class_method_signature: AggregateRepository.initMirror()
focal_class.full_signature: private void initMirror()
focal_class.identifier: initMirror
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void initMirror()
focal_class.class_method_signature: AggregateRepository.shouldBeMirrored()
focal_class.full_signature: private boolean shouldBeMirrored()
focal_class.identifier: shouldBeMirrored
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean shouldBeMirrored()
focal_class.class_method_signature: AggregateRepository.mirrorRepository()
focal_class.full_signature: private Optional<MirrorRepository> mirrorRepository()
focal_class.identifier: mirrorRepository
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: Optional<MirrorRepository>
focal_class.signature: Optional<MirrorRepository> mirrorRepository()
focal_class.class_method_signature: AggregateRepository.aggregateStorage()
focal_class.full_signature: protected AggregateStorage<I> aggregateStorage()
focal_class.identifier: aggregateStorage
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: AggregateStorage<I>
focal_class.signature: AggregateStorage<I> aggregateStorage()
focal_class.class_method_signature: AggregateRepository.loadOrCreate(I id)
focal_class.full_signature: final A loadOrCreate(I id)
focal_class.identifier: loadOrCreate
focal_class.modifiers: final
focal_class.parameters: (I id)
focal_class.return: A
focal_class.signature: A loadOrCreate(I id)
focal_class.class_method_signature: AggregateRepository.doLoadOrCreate(I id)
focal_class.full_signature: @VisibleForTesting protected A doLoadOrCreate(I id)
focal_class.identifier: doLoadOrCreate
focal_class.modifiers: @VisibleForTesting protected
focal_class.parameters: (I id)
focal_class.return: A
focal_class.signature: A doLoadOrCreate(I id)
focal_class.class_method_signature: AggregateRepository.createNew(I id)
focal_class.full_signature: private A createNew(I id)
focal_class.identifier: createNew
focal_class.modifiers: private
focal_class.parameters: (I id)
focal_class.return: A
focal_class.signature: A createNew(I id)
focal_class.class_method_signature: AggregateRepository.load(I id)
focal_class.full_signature: private Optional<A> load(I id)
focal_class.identifier: load
focal_class.modifiers: private
focal_class.parameters: (I id)
focal_class.return: Optional<A>
focal_class.signature: Optional<A> load(I id)
focal_class.class_method_signature: AggregateRepository.loadHistory(I id)
focal_class.full_signature: private Optional<AggregateHistory> loadHistory(I id)
focal_class.identifier: loadHistory
focal_class.modifiers: private
focal_class.parameters: (I id)
focal_class.return: Optional<AggregateHistory>
focal_class.signature: Optional<AggregateHistory> loadHistory(I id)
focal_class.class_method_signature: AggregateRepository.play(I id, AggregateHistory history)
focal_class.full_signature: protected A play(I id, AggregateHistory history)
focal_class.identifier: play
focal_class.modifiers: protected
focal_class.parameters: (I id, AggregateHistory history)
focal_class.return: A
focal_class.signature: A play(I id, AggregateHistory history)
focal_class.class_method_signature: AggregateRepository.find(I id)
focal_class.full_signature: @Override public Optional<A> find(I id)
focal_class.identifier: find
focal_class.modifiers: @Override public
focal_class.parameters: (I id)
focal_class.return: Optional<A>
focal_class.signature: Optional<A> find(I id)
focal_class.class_method_signature: AggregateRepository.onCommandTargetSet(I id, CommandEnvelope cmd)
focal_class.full_signature: private void onCommandTargetSet(I id, CommandEnvelope cmd)
focal_class.identifier: onCommandTargetSet
focal_class.modifiers: private
focal_class.parameters: (I id, CommandEnvelope cmd)
focal_class.return: void
focal_class.signature: void onCommandTargetSet(I id, CommandEnvelope cmd)
focal_class.class_method_signature: AggregateRepository.close()
focal_class.full_signature: @OverridingMethodsMustInvokeSuper @Override public void close()
focal_class.identifier: close
focal_class.modifiers: @OverridingMethodsMustInvokeSuper @Override public
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.superclass: extends Repository<I, A>
focal_method.body: @Override
      public final EventBus eventBus() {
          return context().eventBus();
      }
focal_method.class_method_signature: AggregateRepository.eventBus()
focal_method.full_signature: @Override public final EventBus eventBus()
focal_method.identifier: eventBus
focal_method.invocations: eventBus context
focal_method.modifiers: @Override public final
focal_method.parameters: ()
focal_method.return: EventBus
focal_method.signature: EventBus eventBus()