@Test void testStoreSnapshotDelegated() { GenericDomainEventMessage<Object> snapshot = new GenericDomainEventMessage<>("type", "id", 0, "fail"); testSubject.storeSnapshot(snapshot); verify(mockStorage).storeSnapshot(snapshot); }
@Override public void storeSnapshot(DomainEventMessage<?> snapshot) { delegate.storeSnapshot(snapshot); }
FilteringEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { delegate.storeSnapshot(snapshot); } }
FilteringEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { delegate.storeSnapshot(snapshot); } FilteringEventStorageEngine(EventStorageEngine delegate, Predicate<? super EventMessage<?>> filter); }
FilteringEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { delegate.storeSnapshot(snapshot); } FilteringEventStorageEngine(EventStorageEngine delegate, Predicate<? super EventMessage<?>> filter); @Override void appendEvents(EventMessage<?>... events); @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); @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); }
FilteringEventStorageEngine implements EventStorageEngine { @Override public void storeSnapshot(DomainEventMessage<?> snapshot) { delegate.storeSnapshot(snapshot); } FilteringEventStorageEngine(EventStorageEngine delegate, Predicate<? super EventMessage<?>> filter); @Override void appendEvents(EventMessage<?>... events); @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); @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);  }