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 |
---|---|
RetrievalFactory |
retrievalFactory()
Creates and returns a retrieval factory for the specific configuration
|
void |
setIdleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
Set the value for how long the ShardConsumer should sleep in between calls to
KinesisAsyncClient.getRecords(GetRecordsRequest) . |
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.public void setIdleTimeBetweenReadsInMillis(long idleTimeBetweenReadsInMillis)
KinesisAsyncClient.getRecords(GetRecordsRequest)
. If this is not specified here the value provided in
RecordsFetcherFactory
will be used.public RetrievalFactory retrievalFactory()
RetrievalSpecificConfig
retrievalFactory
in interface RetrievalSpecificConfig
Copyright © 2021. All rights reserved.