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,
ThrottlingReporter throttlingReporter)
Constructor for the PrefetchRecordsPublisher.
|
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,
ThrottlingReporter throttlingReporter,
long awaitTerminationTimeoutMillis)
Constructor for the PrefetchRecordsPublisher.
|
| Modifier and Type | Method and Description |
|---|---|
RequestDetails |
getLastSuccessfulRequestDetails()
Gets last successful request details.
|
void |
notify(RecordsDeliveryAck recordsDeliveryAck)
Notify the publisher on receipt of a data event.
|
void |
restartFrom(RecordsRetrieved recordsRetrieved)
Restart from the last accepted and processed
|
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 RecordsRetrieved> s) |
public PrefetchRecordsPublisher(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
@NonNull
@NonNull GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
@NonNull
@NonNull ExecutorService executorService,
long idleMillisBetweenCalls,
@NonNull
@NonNull MetricsFactory metricsFactory,
@NonNull
@NonNull String operation,
@NonNull
@NonNull String shardId,
ThrottlingReporter throttlingReporter,
long awaitTerminationTimeoutMillis)
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 callawaitTerminationTimeoutMillis - maximum time to wait for graceful shutdown of executorServicePrefetchRecordsPublisherpublic PrefetchRecordsPublisher(int maxPendingProcessRecordsInput,
int maxByteSize,
int maxRecordsCount,
int maxRecordsPerCall,
GetRecordsRetrievalStrategy getRecordsRetrievalStrategy,
ExecutorService executorService,
long idleMillisBetweenCalls,
MetricsFactory metricsFactory,
String operation,
String shardId,
ThrottlingReporter throttlingReporter)
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 RequestDetails getLastSuccessfulRequestDetails()
RecordsPublishergetLastSuccessfulRequestDetails in interface RecordsPublisherpublic void restartFrom(RecordsRetrieved recordsRetrieved)
RecordsPublisherrestartFrom in interface RecordsPublisherrecordsRetrieved - the processRecordsInput to restart frompublic void subscribe(org.reactivestreams.Subscriber<? super RecordsRetrieved> s)
subscribe in interface org.reactivestreams.Publisher<RecordsRetrieved>public void notify(RecordsDeliveryAck recordsDeliveryAck)
RecordsPublishernotify in interface RecordsPublisherrecordsDeliveryAck - acknowledgement received from the subscriber.Copyright © 2024. All rights reserved.