@Test public void readEventsFromOldSegment() { AtomicLong sequenceNumber = new AtomicLong(); testSubject.readEvents("1", true, 0, event -> sequenceNumber.set(event.getAggregateSequenceNumber())); Assert.assertEquals(99, sequenceNumber.intValue()); }
public void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, Consumer<SerializedEvent> eventConsumer) { readEvents(aggregateId, useSnapshots, minSequenceNumber, Long.MAX_VALUE, 0, eventConsumer); }
AggregateReader { public void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, Consumer<SerializedEvent> eventConsumer) { readEvents(aggregateId, useSnapshots, minSequenceNumber, Long.MAX_VALUE, 0, eventConsumer); } }
AggregateReader { public void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, Consumer<SerializedEvent> eventConsumer) { readEvents(aggregateId, useSnapshots, minSequenceNumber, Long.MAX_VALUE, 0, eventConsumer); } AggregateReader(EventStorageEngine eventStorageEngine, SnapshotReader snapshotReader); }
AggregateReader { public void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, Consumer<SerializedEvent> eventConsumer) { readEvents(aggregateId, useSnapshots, minSequenceNumber, Long.MAX_VALUE, 0, eventConsumer); } AggregateReader(EventStorageEngine eventStorageEngine, SnapshotReader snapshotReader); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber,
                           Consumer<SerializedEvent> eventConsumer); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, long maxSequenceNumber,
                           long minToken,
                           Consumer<SerializedEvent> eventConsumer); void readSnapshots(String aggregateId, long minSequenceNumber, long maxSequenceNumber, int maxResults,
                              Consumer<SerializedEvent> eventConsumer); long readHighestSequenceNr(String aggregateId); long readHighestSequenceNr(String aggregateId, int maxSegmentsHint, long maxTokenHint); }
AggregateReader { public void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, Consumer<SerializedEvent> eventConsumer) { readEvents(aggregateId, useSnapshots, minSequenceNumber, Long.MAX_VALUE, 0, eventConsumer); } AggregateReader(EventStorageEngine eventStorageEngine, SnapshotReader snapshotReader); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber,
                           Consumer<SerializedEvent> eventConsumer); void readEvents(String aggregateId, boolean useSnapshots, long minSequenceNumber, long maxSequenceNumber,
                           long minToken,
                           Consumer<SerializedEvent> eventConsumer); void readSnapshots(String aggregateId, long minSequenceNumber, long maxSequenceNumber, int maxResults,
                              Consumer<SerializedEvent> eventConsumer); long readHighestSequenceNr(String aggregateId); long readHighestSequenceNr(String aggregateId, int maxSegmentsHint, long maxTokenHint);  }