public class AsyncWriterImpl extends WriterImpl implements AsyncWriter
id, isReconnecting, isStopped, reconnectCounter| Constructor and Description |
|---|
AsyncWriterImpl(TopicRpc topicRpc,
WriterSettings settings,
Executor compressionExecutor) |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<InitResult> |
init()
Initialize internal threads in the background.
|
CompletableFuture<WriteAck> |
send(Message message)
Send message.
|
CompletableFuture<WriteAck> |
send(Message message,
SendSettings settings)
Send message.
|
CompletableFuture<Void> |
shutdown()
Stops internal threads and makes cleanup in background.
|
flushImpl, getLogger, getStreamName, initImpl, onShutdown, onStreamReconnect, sendImpl, tryToEnqueueonSessionClosed, shutdownImpl, shutdownImplpublic AsyncWriterImpl(TopicRpc topicRpc, WriterSettings settings, Executor compressionExecutor)
public CompletableFuture<InitResult> init()
AsyncWriterinit in interface AsyncWriterCompletableFuture with InitResult containing initialization data like lastSeqNopublic CompletableFuture<WriteAck> send(Message message, SendSettings settings) throws QueueOverflowException
AsyncWritersend in interface AsyncWritermessage - message data to writesettings - send settingsCompletableFuture with WriteAck for write acknowledgementQueueOverflowExceptionpublic CompletableFuture<WriteAck> send(Message message) throws QueueOverflowException
AsyncWritersend in interface AsyncWritermessage - message data to writeCompletableFuture with WriteAck for write acknowledgementQueueOverflowExceptionpublic CompletableFuture<Void> shutdown()
AsyncWritershutdown in interface AsyncWriterCopyright © 2024. All rights reserved.