Interface SystemTopicClient.Reader<T>
- Enclosing interface:
- SystemTopicClient<T>
public static interface SystemTopicClient.Reader<T>
Reader for system topic.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the system topic reader.Close the reader of the system topic asynchronously.Get the system topic of the reader.booleanCheck has more events available for the reader.Check has more events available for the reader asynchronously.org.apache.pulsar.client.api.Message<T>readNext()Read event from system topic.CompletableFuture<org.apache.pulsar.client.api.Message<T>>Async read event from system topic.
-
Method Details
-
readNext
org.apache.pulsar.client.api.Message<T> readNext() throws org.apache.pulsar.client.api.PulsarClientExceptionRead event from system topic.- Returns:
- pulsar event
- Throws:
org.apache.pulsar.client.api.PulsarClientException
-
readNextAsync
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
CompletableFuture<Boolean> hasMoreEventsAsync()Check has more events available for the reader asynchronously.- Returns:
- true if has remaining events, otherwise false
-
close
Close the system topic reader.- Throws:
IOException
-
closeAsync
CompletableFuture<Void> closeAsync()Close the reader of the system topic asynchronously. -
getSystemTopic
SystemTopicClient<T> getSystemTopic()Get the system topic of the reader.- Returns:
- system topic
-