public CurrentDbState mergeExisting(final CurrentDbState existingCurrentDbState) {
        final Long lastEventTime = NullSafe.requireNonNullElseGet(
                this.lastEventTime,
                () -> NullSafe.get(existingCurrentDbState, CurrentDbState::getLastEventTime));

        return new CurrentDbState(
                streamId,
                eventId,
                lastEventTime);
    }
Merges existingCurrentDbState with this to create a new state.
stroom-query/stroom-query-common/src/main/java/stroom/query/common/v2/CurrentDbState.java