@Test public void getEventSource() { EventSource eventSource = testSubject.getEventSource(0).get(); EventIterator iterator = eventSource.createEventIterator(0, 5); assertTrue(iterator.hasNext()); EventInformation next = iterator.next(); assertEquals(5, next.getToken()); while( iterator.hasNext()) { next = iterator.next(); } assertEquals(13, next.getToken()); }
@Override public Optional<EventSource> getEventSource(long segment) { logger.debug("Get eventsource: {}", segment); InputStreamEventSource eventSource = get(segment, false); logger.trace("result={}", eventSource); if (eventSource == null) { return Optional.empty(); } return Optional.of(eventSource); }
InputStreamEventStore extends SegmentBasedEventStore implements ReadOnlySegmentsHandler { @Override public Optional<EventSource> getEventSource(long segment) { logger.debug("Get eventsource: {}", segment); InputStreamEventSource eventSource = get(segment, false); logger.trace("result={}", eventSource); if (eventSource == null) { return Optional.empty(); } return Optional.of(eventSource); } }
InputStreamEventStore extends SegmentBasedEventStore implements ReadOnlySegmentsHandler { @Override public Optional<EventSource> getEventSource(long segment) { logger.debug("Get eventsource: {}", segment); InputStreamEventSource eventSource = get(segment, false); logger.trace("result={}", eventSource); if (eventSource == null) { return Optional.empty(); } return Optional.of(eventSource); } InputStreamEventStore(EventTypeContext context, IndexManager indexManager,
                                 EventTransformerFactory eventTransformerFactory,
                                 StorageProperties storageProperties, MeterFactory meterFactory); }
InputStreamEventStore extends SegmentBasedEventStore implements ReadOnlySegmentsHandler { @Override public Optional<EventSource> getEventSource(long segment) { logger.debug("Get eventsource: {}", segment); InputStreamEventSource eventSource = get(segment, false); logger.trace("result={}", eventSource); if (eventSource == null) { return Optional.empty(); } return Optional.of(eventSource); } InputStreamEventStore(EventTypeContext context, IndexManager indexManager,
                                 EventTransformerFactory eventTransformerFactory,
                                 StorageProperties storageProperties, MeterFactory meterFactory); @Override void handover(Long segment, Runnable callback); @Override void initSegments(long lastInitialized); @Override void close(boolean deleteData); @Override Optional<EventSource> getEventSource(long segment); @Override void deleteAllEventData(); }
InputStreamEventStore extends SegmentBasedEventStore implements ReadOnlySegmentsHandler { @Override public Optional<EventSource> getEventSource(long segment) { logger.debug("Get eventsource: {}", segment); InputStreamEventSource eventSource = get(segment, false); logger.trace("result={}", eventSource); if (eventSource == null) { return Optional.empty(); } return Optional.of(eventSource); } InputStreamEventStore(EventTypeContext context, IndexManager indexManager,
                                 EventTransformerFactory eventTransformerFactory,
                                 StorageProperties storageProperties, MeterFactory meterFactory); @Override void handover(Long segment, Runnable callback); @Override void initSegments(long lastInitialized); @Override void close(boolean deleteData); @Override Optional<EventSource> getEventSource(long segment); @Override void deleteAllEventData();  }