AtomicReference<Long> currentSequenceNumber = new AtomicReference<>(); Stream<IntermediateEventRepresentation> upcastResult = upcastAndDeserialize(eventEntryStream, upcasterChain, entry -> { InitialEventRepresentation result = new InitialEventRepresentation(entry, serializer); currentSequenceNumber.set(result.getSequenceNumber().get());
AtomicReference<Long> currentSequenceNumber = new AtomicReference<>(); Stream<IntermediateEventRepresentation> upcastResult = upcastAndDeserialize(eventEntryStream, upcasterChain, entry -> { InitialEventRepresentation result = new InitialEventRepresentation(entry, serializer); currentSequenceNumber.set(result.getSequenceNumber().get());