@Override public List<SourceRecord> poll() throws InterruptedException { final List<DataChangeEvent> records = queue.poll(); final List<SourceRecord> sourceRecords = records.stream() .map(DataChangeEvent::getRecord) .collect(Collectors.toList()); if (!sourceRecords.isEmpty()) { this.lastOffset = sourceRecords.get(sourceRecords.size() - 1).sourceOffset(); } return sourceRecords; }
@Override public List<SourceRecord> poll() throws InterruptedException { List<ChangeEvent> events = changeEventQueue.poll(); if (events.size() > 0) { lastCompletelyProcessedLsn = events.get(events.size() - 1).getLastCompletelyProcessedLsn(); } return events.stream().map(ChangeEvent::getRecord).collect(Collectors.toList()); }
@Override public List<SourceRecord> poll() throws InterruptedException { if (replicatorError != null) { throw new ConnectException("Failing connector task, at least one of the replicators has failed"); } List<SourceRecord> records = queue.poll(); recordSummarizer.accept(records); return records; }
@Override public List<SourceRecord> poll() throws InterruptedException { List<DataChangeEvent> records = queue.poll(); List<SourceRecord> sourceRecords = records.stream() .map(DataChangeEvent::getRecord) .collect(Collectors.toList()); if (!sourceRecords.isEmpty()) { this.lastOffset = sourceRecords.get(sourceRecords.size() - 1).sourceOffset(); } return sourceRecords; }
@Override public List<SourceRecord> poll() throws InterruptedException { List<ChangeEvent> events = changeEventQueue.poll(); if (events.size() > 0) { lastCompletelyProcessedLsn = events.get(events.size() - 1).getLastCompletelyProcessedLsn(); } return events.stream().map(ChangeEvent::getRecord).collect(Collectors.toList()); }