Add ProcessRecordsInput.getGetRecordsResult. Fixes #27.
This commit is contained in:
parent
4dfc17d04a
commit
747e8e6cc2
2 changed files with 24 additions and 0 deletions
|
|
@ -167,6 +167,7 @@ class ProcessTask implements ITask {
|
|||
@SuppressWarnings("unchecked")
|
||||
final ProcessRecordsInput processRecordsInput = new ProcessRecordsInput()
|
||||
.withRecords((List<Record>) (List<?>) subRecords)
|
||||
.withGetRecordsResult(getRecordsResult)
|
||||
.withCheckpointer(recordProcessorCheckpointer);
|
||||
|
||||
recordProcessor.processRecords(processRecordsInput);
|
||||
|
|
|
|||
|
|
@ -15,7 +15,9 @@
|
|||
package com.amazonaws.services.kinesis.clientlibrary.types;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.amazonaws.services.kinesis.clientlibrary.interfaces.IRecordProcessorCheckpointer;
|
||||
import com.amazonaws.services.kinesis.model.GetRecordsResult;
|
||||
import com.amazonaws.services.kinesis.model.Record;
|
||||
|
||||
/**
|
||||
|
|
@ -27,6 +29,7 @@ public class ProcessRecordsInput {
|
|||
|
||||
private List<Record> records;
|
||||
private IRecordProcessorCheckpointer checkpointer;
|
||||
private GetRecordsResult getRecordsResult;
|
||||
|
||||
/**
|
||||
* Default constructor.
|
||||
|
|
@ -73,4 +76,24 @@ public class ProcessRecordsInput {
|
|||
this.checkpointer = checkpointer;
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue