@Nullable
    private List<Record> getRecords(GetRecordsRequest getRecordsRequest) {
        return tryAmazonAction("", () -> {
            GetRecordsResult getRecordsResult = m_kinesis.getRecords(getRecordsRequest);
            m_shardIterator = getRecordsResult.getNextShardIterator();
            List<Record> records = getRecordsResult.getRecords();
            LOG.trace("Get records", args -> args.add("streamName", m_streamName).add("record number", records.size())
                    .add("millisBehindLatest", getRecordsResult.getMillisBehindLatest()));
            return records;
        }, m_durationBetweenRequests).orElse(List.of());
    }
@Nullable
    private List<Record> getRecords(GetRecordsRequest getRecordsRequest) {
        return tryAmazonAction("", () -> {
            GetRecordsResult getRecordsResult = m_kinesis.getRecords(getRecordsRequest);
            m_shardIterator = getRecordsResult.getNextShardIterator();
            List<Record> records = getRecordsResult.getRecords();
            LOG.trace("Get records", args -> args.add("streamName", m_streamName).add("record number", records.size())
                    .add("millisBehindLatest", getRecordsResult.getMillisBehindLatest()));
            return records;
        }, m_durationBetweenRequests).orElse(List.of());
    }
@ Nullable private List < Record > getRecords ( GetRecordsRequest getRecordsRequest ) { return tryAmazonAction ( "" , ( ) -> { GetRecordsResult getRecordsResult = m_kinesis . getRecords ( getRecordsRequest ) ; m_shardIterator = getRecordsResult . getNextShardIterator ( ) ; List < Record > records = getRecordsResult . getRecords ( ) ; LOG . trace ( "Get records" , args -> args . add ( "streamName" , m_streamName ) . add ( "record number" , records . size ( ) ) . add ( "millisBehindLatest" , getRecordsResult . getMillisBehindLatest ( ) ) ) ; return records ; } , m_durationBetweenRequests ) . orElse ( List . of ( ) ) ; }
Retrieves records corresponding to the request.

@param getRecordsRequest the request
@return records corresponding to the request
Retrieves records corresponding to the request .