Small addition to EventSystemReplayImpl to make Replay Tests work
private List<Class<?>> selectedClassesToReplay;
/** The current Status of Record And Replay */
private RecordAndReplayCurrentStatus recordAndReplayCurrentStatus;
+ /** The position of the last recorded event processed */
+ private long lastRecordedEventPosition;
public EventSystemReplayImpl(EventLibrary eventLibrary, NetworkSystem networkSystem, EngineEntityManager entityManager,
@@ -259,6 +261,7 @@ private void processRecordedEventsBatch(long maxDuration) {
} else {
originalSend(entity, re.getEvent());
}
+ this.lastRecordedEventPosition = re.getPosition();
// Check if time is up.
if ((System.currentTimeMillis() - beginTime) >= maxDuration) {
return;
@@ -577,6 +580,10 @@ private void broadcastEvent(EntityRef entity, Event event, EventMetadata metadat
return result;
}
+ public long getLastRecordedEventPosition() {
+ return lastRecordedEventPosition;
+ }
+
private static class EventHandlerPriorityComparator implements Comparator<EventSystemReplayImpl.EventHandlerInfo> {
@Override
