public class PrefetchGetRecordsCache extends Object implements GetRecordsCache
| Constructor and Description |
|---|
PrefetchGetRecordsCache(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
@NonNull GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
@NonNull ExecutorService executorService,
long idleMillisBetweenCalls,
@NonNull IMetricsFactory metricsFactory,
@NonNull String operation,
@NonNull String shardId)
Constructor for the PrefetchGetRecordsCache.
|
| Modifier and Type | Method and Description |
|---|---|
GetRecordsRetrievalStrategy |
getGetRecordsRetrievalStrategy() |
ProcessRecordsInput |
getNextResult()
This method returns the next set of records from the Cache if present, or blocks the request till it gets the
next set of records back from Kinesis.
|
void |
shutdown()
This method calls the shutdown behavior on the cache, if available.
|
void |
start()
This method calls the start behavior on the cache, if available.
|
public PrefetchGetRecordsCache(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
@NonNull
@NonNull GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
@NonNull
@NonNull ExecutorService executorService,
long idleMillisBetweenCalls,
@NonNull
@NonNull IMetricsFactory metricsFactory,
@NonNull
@NonNull String operation,
@NonNull
@NonNull String shardId)
maxPendingProcessRecordsInput - Max number of ProcessRecordsInput that can be held in the cache before
blockingmaxByteSize - Max byte size of the queue before blocking next get records callmaxRecordsCount - Max number of records in the queue across all ProcessRecordInput objectsmaxRecordsPerCall - Max records to be returned per callgetRecordsRetrievalStrategy - Retrieval strategy for the get records callexecutorService - Executor service for the cacheidleMillisBetweenCalls - maximum time to wait before dispatching the next get records callPrefetchGetRecordsCachepublic void start()
GetRecordsCachestart in interface GetRecordsCachepublic ProcessRecordsInput getNextResult()
GetRecordsCachegetNextResult in interface GetRecordsCachepublic GetRecordsRetrievalStrategy getGetRecordsRetrievalStrategy()
getGetRecordsRetrievalStrategy in interface GetRecordsCachepublic void shutdown()
GetRecordsCacheshutdown in interface GetRecordsCacheCopyright © 2023. All rights reserved.