public class PrefetchRecordsPublisher extends Object implements RecordsPublisher
| Constructor and Description |
|---|
PrefetchRecordsPublisher(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
ExecutorService executorService,
long idleMillisBetweenCalls,
MetricsFactory metricsFactory,
String operation,
String shardId)
Constructor for the PrefetchRecordsPublisher.
|
| Modifier and Type | Method and Description |
|---|---|
void |
shutdown()
Shutdowns the publisher.
|
void |
start(ExtendedSequenceNumber extendedSequenceNumber,
InitialPositionInStreamExtended initialPositionInStreamExtended)
Initializes the publisher with where to start processing.
|
void |
subscribe(org.reactivestreams.Subscriber<? super ProcessRecordsInput> s) |
public PrefetchRecordsPublisher(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
@NonNull
GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
@NonNull
ExecutorService executorService,
long idleMillisBetweenCalls,
@NonNull
MetricsFactory metricsFactory,
@NonNull
String operation,
@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 callPrefetchRecordsPublisherpublic void start(ExtendedSequenceNumber extendedSequenceNumber, InitialPositionInStreamExtended initialPositionInStreamExtended)
RecordsPublisherstart in interface RecordsPublisherextendedSequenceNumber - the sequence number to start processing frominitialPositionInStreamExtended - if there is no sequence number the initial position to usepublic void shutdown()
RecordsPublishershutdown in interface RecordsPublisherpublic void subscribe(org.reactivestreams.Subscriber<? super ProcessRecordsInput> s)
subscribe in interface org.reactivestreams.Publisher<ProcessRecordsInput>Copyright © 2019. All rights reserved.