@Test void testPublishEventsSendsToActiveStorageOnly() { List<EventMessage<Object>> events = singletonList(GenericEventMessage.asEventMessage("test")); testSubject.appendEvents(events); verify(historicStorage, never()).appendEvents(anyList()); verify(activeStorage).appendEvents(events); }
@Override public void appendEvents(List<? extends EventMessage<?>> events) { activeStorage.appendEvents(events); }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void appendEvents(List<? extends EventMessage<?>> events) { activeStorage.appendEvents(events); } }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void appendEvents(List<? extends EventMessage<?>> events) { activeStorage.appendEvents(events); } SequenceEventStorageEngine(EventStorageEngine historicStorage, EventStorageEngine activeStorage); }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void appendEvents(List<? extends EventMessage<?>> events) { activeStorage.appendEvents(events); } SequenceEventStorageEngine(EventStorageEngine historicStorage, EventStorageEngine activeStorage); @Override void appendEvents(List<? extends EventMessage<?>> events); @Override void storeSnapshot(DomainEventMessage<?> snapshot); @Override Stream<? extends TrackedEventMessage<?>> readEvents(TrackingToken trackingToken, boolean mayBlock); @Override DomainEventStream readEvents(String aggregateIdentifier, long firstSequenceNumber); @Override Optional<DomainEventMessage<?>> readSnapshot(String aggregateIdentifier); @Override Optional<Long> lastSequenceNumberFor(String aggregateIdentifier); @Override TrackingToken createTailToken(); @Override TrackingToken createHeadToken(); @Override TrackingToken createTokenAt(Instant dateTime); }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void appendEvents(List<? extends EventMessage<?>> events) { activeStorage.appendEvents(events); } SequenceEventStorageEngine(EventStorageEngine historicStorage, EventStorageEngine activeStorage); @Override void appendEvents(List<? extends EventMessage<?>> events); @Override void storeSnapshot(DomainEventMessage<?> snapshot); @Override Stream<? extends TrackedEventMessage<?>> readEvents(TrackingToken trackingToken, boolean mayBlock); @Override DomainEventStream readEvents(String aggregateIdentifier, long firstSequenceNumber); @Override Optional<DomainEventMessage<?>> readSnapshot(String aggregateIdentifier); @Override Optional<Long> lastSequenceNumberFor(String aggregateIdentifier); @Override TrackingToken createTailToken(); @Override TrackingToken createHeadToken(); @Override TrackingToken createTokenAt(Instant dateTime);  }