@Test void testSnapshotsStoredInActiveStorage() { DomainEventMessage<String> event1 = new GenericDomainEventMessage<>("type", "aggregate", 0, "test1"); testSubject.storeSnapshot(event1); verify(activeStorage).storeSnapshot(event1); verify(historicStorage, never()).storeSnapshot(any()); }
@Override public void storeSnapshot(DomainEventMessage<?> snapshot) { activeStorage.storeSnapshot(snapshot); }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { activeStorage.storeSnapshot(snapshot); } }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { activeStorage.storeSnapshot(snapshot); } SequenceEventStorageEngine(EventStorageEngine historicStorage, EventStorageEngine activeStorage); }
SequenceEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { activeStorage.storeSnapshot(snapshot); } 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 storeSnapshot(DomainEventMessage<?> snapshot) { activeStorage.storeSnapshot(snapshot); } 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);  }