public class SimpleRecordsFetcherFactory extends Object implements RecordsFetcherFactory
| Constructor and Description |
|---|
SimpleRecordsFetcherFactory() |
| Modifier and Type | Method and Description |
|---|---|
RecordsPublisher |
createRecordsFetcher(GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
String shardId,
MetricsFactory metricsFactory,
int maxRecords)
Returns a RecordsPublisher to be used for retrieving records for a given shard.
|
DataFetchingStrategy |
dataFetchingStrategy() |
void |
dataFetchingStrategy(DataFetchingStrategy dataFetchingStrategy)
Sets the dataFetchingStrategy to determine the type of RecordsPublisher to be used.
|
long |
idleMillisBetweenCalls() |
void |
idleMillisBetweenCalls(long idleMillisBetweenCalls)
Sets the maximum idle time between two get calls.
|
int |
maxByteSize() |
void |
maxByteSize(int maxByteSize)
Sets the max byte size for the RecordsPublisher, before further requests are blocked.
|
int |
maxPendingProcessRecordsInput() |
void |
maxPendingProcessRecordsInput(int maxPendingProcessRecordsInput)
Sets the maximum number of ProcessRecordsInput objects the RecordsPublisher can hold, before further requests are
blocked.
|
int |
maxRecordsCount() |
void |
maxRecordsCount(int maxRecordsCount)
Sets the max number of records for the RecordsPublisher can hold, before further requests are blocked.
|
public RecordsPublisher createRecordsFetcher(GetRecordsRetrievalStrategy getRecordsRetrievalStrategy, String shardId, MetricsFactory metricsFactory, int maxRecords)
RecordsFetcherFactorycreateRecordsFetcher in interface RecordsFetcherFactorygetRecordsRetrievalStrategy - GetRecordsRetrievalStrategy to be used with the RecordsPublishershardId - ShardId of the shard that the fetcher will retrieve records formetricsFactory - MetricsFactory used to create metricScopemaxRecords - Max number of records to be returned in a single get callpublic void maxPendingProcessRecordsInput(int maxPendingProcessRecordsInput)
RecordsFetcherFactorymaxPendingProcessRecordsInput in interface RecordsFetcherFactorymaxPendingProcessRecordsInput - The maximum number of ProcessRecordsInput objects that the cache will accept
before blocking.public void maxByteSize(int maxByteSize)
RecordsFetcherFactorymaxByteSize in interface RecordsFetcherFactorymaxByteSize - The maximum byte size for the cache before blocking.public void maxRecordsCount(int maxRecordsCount)
RecordsFetcherFactorymaxRecordsCount in interface RecordsFetcherFactorymaxRecordsCount - The mximum number of records in the cache before blocking.public void dataFetchingStrategy(DataFetchingStrategy dataFetchingStrategy)
RecordsFetcherFactorydataFetchingStrategy in interface RecordsFetcherFactorydataFetchingStrategy - Fetching strategy to be usedpublic void idleMillisBetweenCalls(long idleMillisBetweenCalls)
RecordsFetcherFactoryidleMillisBetweenCalls in interface RecordsFetcherFactoryidleMillisBetweenCalls - Sleep millis between calls.public int maxPendingProcessRecordsInput()
maxPendingProcessRecordsInput in interface RecordsFetcherFactorypublic int maxByteSize()
maxByteSize in interface RecordsFetcherFactorypublic int maxRecordsCount()
maxRecordsCount in interface RecordsFetcherFactorypublic DataFetchingStrategy dataFetchingStrategy()
dataFetchingStrategy in interface RecordsFetcherFactorypublic long idleMillisBetweenCalls()
idleMillisBetweenCalls in interface RecordsFetcherFactoryCopyright © 2019. All rights reserved.