Skip to content

Commit edf50d6

Browse files
committed
upgrade to eventstore 0.4.2
1 parent 399f34b commit edf50d6

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
<properties>
3535
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3636

37-
<sliceworkz.eventstore.version>0.4.1</sliceworkz.eventstore.version>
37+
<sliceworkz.eventstore.version>0.4.2</sliceworkz.eventstore.version>
3838

3939
<maven.minimal-version>3.6.3</maven.minimal-version>
4040

sliceworkz-eventmodeling-examples/src/main/java/org/sliceworkz/eventmodeling/examples/banking/BankingExample.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,12 +77,13 @@ public static void main ( String[] args ) {
7777
private EventReference lastSeen;
7878

7979
@Override
80-
public void eventsAppended(EventReference atLeastUntil) {
80+
public EventReference eventsAppended(EventReference atLeastUntil) {
8181
List<Event<BankingDomainEvent>> events = eventStream.query(EventQuery.matchAll(), lastSeen).toList();
8282
events.forEach(System.out::println);
8383
if ( events.size() > 0 ) {
8484
lastSeen = events.getLast().reference();
8585
}
86+
return lastSeen;
8687
}
8788
}
8889
);

sliceworkz-eventmodeling-impl/src/main/java/org/sliceworkz/eventmodeling/module/eventdispatching/EventuallyConsistentEventProcessor.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public void start ( ) {
9292
}
9393

9494
@Override
95-
public void eventsAppended(EventReference atLeastUntil) {
95+
public EventReference eventsAppended(EventReference atLeastUntil) {
9696
LOGGER.debug("eventually consistent event processor notified of updates until at least {}", atLeastUntil);
9797
if ( lastReference == null || (atLeastUntil.position() > lastReference.position()) ) {
9898
// might be new interesting events. in case we're wait()-ing, let's continue and query immediately to check!
@@ -101,9 +101,11 @@ public void eventsAppended(EventReference atLeastUntil) {
101101
potentiallyNewEventsAppended = true;
102102
this.notify();
103103
}
104+
return atLeastUntil;
104105
} else {
105106
// nothing new to discover, we're already at this position in the stream with our processing
106107
LOGGER.debug("nothing new to process based on this update, already at {}", lastReference);
108+
return lastReference;
107109
}
108110
}
109111

sliceworkz-eventmodeling-tests-inmem/src/test/java/org/sliceworkz/eventmodeling/mock/boundedcontext/InvocationCountingEventStorage.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,5 +79,10 @@ public Optional<EventReference> getBookmark(String reader) {
7979
public void bookmark(String reader, EventReference eventReference, Tags tags ) {
8080
wrapped.bookmark(reader, eventReference, tags);
8181
}
82+
83+
@Override
84+
public void removeBookmark(String reader) {
85+
wrapped.removeBookmark(reader);
86+
}
8287

8388
}

0 commit comments

Comments
 (0)