private void callShutdownOnStrategy() { if (!getRecordsRetrievalStrategy.isShutdown()) { getRecordsRetrievalStrategy.shutdown(); } }
@Override public ProcessRecordsInput getNextResult() { GetRecordsResult getRecordsResult = getRecordsRetrievalStrategy.getRecords(maxRecordsPerCall); return new ProcessRecordsInput() .withRecords(getRecordsResult.getRecords()) .withMillisBehindLatest(getRecordsResult.getMillisBehindLatest()); }
@Override public void shutdown() { getRecordsRetrievalStrategy.shutdown(); } }
Validate.notEmpty(operation, "Operation cannot be empty"); this.operation = operation; this.dataFetcher = this.getRecordsRetrievalStrategy.getDataFetcher(); this.shardId = shardId;
try { sleepBeforeNextCall(); GetRecordsResult getRecordsResult = getRecordsRetrievalStrategy.getRecords(maxRecordsPerCall); lastSuccessfulCall = Instant.now(); ProcessRecordsInput processRecordsInput = new ProcessRecordsInput()