Interface SystemTopicClient.Reader<T>
-
- Enclosing interface:
- SystemTopicClient<T>
public static interface SystemTopicClient.Reader<T>Reader for system topic.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidclose()Close the system topic reader.java.util.concurrent.CompletableFuture<java.lang.Void>closeAsync()Close the reader of the system topic asynchronously.SystemTopicClient<T>getSystemTopic()Get the system topic of the reader.booleanhasMoreEvents()Check has more events available for the reader.java.util.concurrent.CompletableFuture<java.lang.Boolean>hasMoreEventsAsync()Check has more events available for the reader asynchronously.org.apache.pulsar.client.api.Message<T>readNext()Read event from system topic.java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<T>>readNextAsync()Async read event from system topic.
-
-
-
Method Detail
-
readNext
org.apache.pulsar.client.api.Message<T> readNext() throws org.apache.pulsar.client.api.PulsarClientException
Read event from system topic.- Returns:
- pulsar event
- Throws:
org.apache.pulsar.client.api.PulsarClientException
-
readNextAsync
java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Message<T>> readNextAsync()
Async read event from system topic.- Returns:
- pulsar event future
-
hasMoreEvents
boolean hasMoreEvents() throws org.apache.pulsar.client.api.PulsarClientExceptionCheck has more events available for the reader.- Returns:
- true if has remaining events, otherwise false
- Throws:
org.apache.pulsar.client.api.PulsarClientException
-
hasMoreEventsAsync
java.util.concurrent.CompletableFuture<java.lang.Boolean> hasMoreEventsAsync()
Check has more events available for the reader asynchronously.- Returns:
- true if has remaining events, otherwise false
-
close
void close() throws java.io.IOExceptionClose the system topic reader.- Throws:
java.io.IOException
-
closeAsync
java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
Close the reader of the system topic asynchronously.
-
getSystemTopic
SystemTopicClient<T> getSystemTopic()
Get the system topic of the reader.- Returns:
- system topic
-
-