This commit is contained in:
Stephen Haberman 2015-07-09 02:59:46 +00:00
commit c9f6d590d7
2 changed files with 24 additions and 0 deletions

View file

@ -167,6 +167,7 @@ class ProcessTask implements ITask {
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
final ProcessRecordsInput processRecordsInput = new ProcessRecordsInput() final ProcessRecordsInput processRecordsInput = new ProcessRecordsInput()
.withRecords((List<Record>) (List<?>) subRecords) .withRecords((List<Record>) (List<?>) subRecords)
.withGetRecordsResult(getRecordsResult)
.withCheckpointer(recordProcessorCheckpointer); .withCheckpointer(recordProcessorCheckpointer);
recordProcessor.processRecords(processRecordsInput); recordProcessor.processRecords(processRecordsInput);

View file

@ -15,7 +15,9 @@
package com.amazonaws.services.kinesis.clientlibrary.types; package com.amazonaws.services.kinesis.clientlibrary.types;
import java.util.List; import java.util.List;
import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorCheckpointer; import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorCheckpointer;
import com.amazonaws.services.kinesis.model.GetRecordsResult;
import com.amazonaws.services.kinesis.model.Record; import com.amazonaws.services.kinesis.model.Record;
/** /**
@ -27,6 +29,7 @@ public class ProcessRecordsInput {
private List<Record> records; private List<Record> records;
private IRecordProcessorCheckpointer checkpointer; private IRecordProcessorCheckpointer checkpointer;
private GetRecordsResult getRecordsResult;
/** /**
* Default constructor. * Default constructor.
@ -73,4 +76,24 @@ public class ProcessRecordsInput {
this.checkpointer = checkpointer; this.checkpointer = checkpointer;
return this; return this;
} }
/**
* Get the GetRecordsResult that was for the current batch.
*
* @return GetRecordsResult for the records to be processed
*/
public GetRecordsResult getGetRecordsResult() {
return getRecordsResult;
}
/**
* Set GetRecordsResult.
*
* @param getRecordsResult GetRecordsResult for the records
* @return A reference to this updated object so that method calls can be chained together.
*/
public ProcessRecordsInput withGetRecordsResult(GetRecordsResult getRecordsResult) {
this.getRecordsResult = getRecordsResult;
return this;
}
} }