@ExperimentalApi(value="Topic service interfaces are experimental and may change without notice")
public interface SyncWriter
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
Waits until all current writes will be sent to server and response will be received.
|
void |
init()
Initialize internal threads in the background.
|
InitResult |
initAndWait()
Initialize internal threads and wait for server init response.
|
void |
send(Message message)
Send message.
|
void |
send(Message message,
long timeout,
TimeUnit unit)
Send message.
|
void |
shutdown(long timeout,
TimeUnit unit)
Stops internal threads and makes cleanup in background.
|
void init()
InitResult initAndWait()
InitResult containing initialization data like lastSeqNovoid send(Message message)
message - message data to writevoid send(Message message, long timeout, TimeUnit unit) throws InterruptedException, ExecutionException, TimeoutException
TimeoutException if message was not put into queuemessage - message data to writetimeout - timeout to wait until message is punt into sending bufferunit - TimeUnit for timeoutInterruptedExceptionExecutionExceptionTimeoutExceptionvoid flush()
void shutdown(long timeout,
TimeUnit unit)
throws InterruptedException,
ExecutionException,
TimeoutException
Copyright © 2024. All rights reserved.