public class PollingConfig extends Object implements RetrievalSpecificConfig
| Modifier and Type | Field and Description |
|---|---|
static Duration |
DEFAULT_REQUEST_TIMEOUT |
| Constructor and Description |
|---|
PollingConfig(software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisClient) |
PollingConfig(String streamName,
software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisClient) |
| Modifier and Type | Method and Description |
|---|---|
PollingConfig |
idleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
Set the value for how long the ShardConsumer should sleep in between calls to
KinesisAsyncClient.getRecords(GetRecordsRequest). |
RetrievalFactory |
retrievalFactory()
Creates and returns a retrieval factory for the specific configuration
|
void |
setIdleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
Deprecated.
|
void |
validateState(boolean isMultiStream)
Validates this instance is configured properly.
|
public static final Duration DEFAULT_REQUEST_TIMEOUT
public PollingConfig(software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisClient)
kinesisClient - Client used to access Kinesis services.public PollingConfig(String streamName, software.amazon.awssdk.services.kinesis.KinesisAsyncClient kinesisClient)
streamName - Name of Kinesis stream.kinesisClient - Client used to access Kinesis serivces.@Deprecated public void setIdleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
public PollingConfig idleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
KinesisAsyncClient.getRecords(GetRecordsRequest). If this is not specified here the value provided in
RecordsFetcherFactory will be used.public RetrievalFactory retrievalFactory()
RetrievalSpecificConfigretrievalFactory in interface RetrievalSpecificConfigpublic void validateState(boolean isMultiStream)
RetrievalSpecificConfigIllegalArgumentException -- should be thrown so
the caller may rectify the misconfiguration.validateState in interface RetrievalSpecificConfigisMultiStream - whether state should be validated for multi-streamCopyright © 2023. All rights reserved.