Update PollingConfig maxRecords method to return PollingConfig (#1275)

This commit is contained in:
Eric Meisel 2024-03-15 16:11:22 -05:00 committed by GitHub
parent ddff314020
commit a95aa9e39e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -146,12 +146,13 @@ public class PollingConfig implements RetrievalSpecificConfig {
return this;
}
public void maxRecords(int maxRecords) {
public PollingConfig maxRecords(int maxRecords) {
if (maxRecords > DEFAULT_MAX_RECORDS) {
throw new IllegalArgumentException(
"maxRecords must be less than or equal to " + DEFAULT_MAX_RECORDS + " but current value is " + maxRecords());
}
this.maxRecords = maxRecords;
return this;
}
/**