public class AsyncReaderImpl extends ReaderImpl implements AsyncReader
id, isReconnecting, isStopped, reconnectCounter| Constructor and Description |
|---|
AsyncReaderImpl(TopicRpc topicRpc,
ReaderSettings settings,
ReadEventHandlersSettings handlersSettings) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
handleClosePartitionSession(PartitionSession partitionSession) |
protected void |
handleCommitResponse(long committedOffset,
PartitionSession partitionSession) |
protected CompletableFuture<Void> |
handleDataReceivedEvent(DataReceivedEvent event) |
protected void |
handleReaderClosed() |
protected void |
handleStartPartitionSessionRequest(tech.ydb.proto.topic.YdbTopic.StreamReadMessage.StartPartitionSessionRequest request,
PartitionSession partitionSession,
Consumer<StartPartitionSessionSettings> confirmCallback) |
protected void |
handleStopPartitionSession(tech.ydb.proto.topic.YdbTopic.StreamReadMessage.StopPartitionSessionRequest request,
Long partitionId,
Runnable confirmCallback) |
CompletableFuture<Void> |
init()
Initialize reading in the background.
|
protected void |
onShutdown(String reason) |
CompletableFuture<Void> |
shutdown()
Stops internal threads and makes cleanup in background.
|
getLogger, getStreamName, initImpl, onStreamReconnectonSessionClosed, shutdownImpl, shutdownImplpublic AsyncReaderImpl(TopicRpc topicRpc, ReaderSettings settings, ReadEventHandlersSettings handlersSettings)
public CompletableFuture<Void> init()
AsyncReaderinit in interface AsyncReaderprotected CompletableFuture<Void> handleDataReceivedEvent(DataReceivedEvent event)
handleDataReceivedEvent in class ReaderImplprotected void handleCommitResponse(long committedOffset,
PartitionSession partitionSession)
handleCommitResponse in class ReaderImplprotected void handleStartPartitionSessionRequest(tech.ydb.proto.topic.YdbTopic.StreamReadMessage.StartPartitionSessionRequest request,
PartitionSession partitionSession,
Consumer<StartPartitionSessionSettings> confirmCallback)
handleStartPartitionSessionRequest in class ReaderImplprotected void handleStopPartitionSession(tech.ydb.proto.topic.YdbTopic.StreamReadMessage.StopPartitionSessionRequest request,
@Nullable
Long partitionId,
Runnable confirmCallback)
handleStopPartitionSession in class ReaderImplprotected void handleClosePartitionSession(PartitionSession partitionSession)
handleClosePartitionSession in class ReaderImplprotected void handleReaderClosed()
protected void onShutdown(String reason)
onShutdown in class ReaderImplpublic CompletableFuture<Void> shutdown()
AsyncReadershutdown in interface AsyncReaderCopyright © 2024. All rights reserved.