public abstract class SystemTopicClientBase<T> extends Object implements SystemTopicClient<T>
SystemTopicClient.Reader<T>, SystemTopicClient.Writer<T>| Modifier and Type | Field and Description |
|---|---|
protected org.apache.pulsar.client.api.PulsarClient |
client |
protected List<SystemTopicClient.Reader<T>> |
readers |
protected org.apache.pulsar.common.naming.TopicName |
topicName |
protected List<SystemTopicClient.Writer<T>> |
writers |
| Constructor and Description |
|---|
SystemTopicClientBase(org.apache.pulsar.client.api.PulsarClient client,
org.apache.pulsar.common.naming.TopicName topicName) |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the system topic.
|
CompletableFuture<Void> |
closeAsync()
Close the system topic asynchronously.
|
List<SystemTopicClient.Reader<T>> |
getReaders()
Get all readers of the system topic.
|
org.apache.pulsar.common.naming.TopicName |
getTopicName()
Get topic name of the system topic.
|
List<SystemTopicClient.Writer<T>> |
getWriters()
Get all writers of the system topic.
|
SystemTopicClient.Reader<T> |
newReader()
Create a reader for the system topic.
|
CompletableFuture<SystemTopicClient.Reader<T>> |
newReaderAsync()
Create a reader for the system topic asynchronously.
|
protected abstract CompletableFuture<SystemTopicClient.Reader<T>> |
newReaderAsyncInternal() |
SystemTopicClient.Writer<T> |
newWriter()
Create a writer for the system topic.
|
CompletableFuture<SystemTopicClient.Writer<T>> |
newWriterAsync()
Create a writer for the system topic asynchronously.
|
protected abstract CompletableFuture<SystemTopicClient.Writer<T>> |
newWriterAsyncInternal() |
protected final org.apache.pulsar.common.naming.TopicName topicName
protected final org.apache.pulsar.client.api.PulsarClient client
protected final List<SystemTopicClient.Writer<T>> writers
protected final List<SystemTopicClient.Reader<T>> readers
public SystemTopicClientBase(org.apache.pulsar.client.api.PulsarClient client,
org.apache.pulsar.common.naming.TopicName topicName)
public SystemTopicClient.Reader<T> newReader() throws org.apache.pulsar.client.api.PulsarClientException
SystemTopicClientnewReader in interface SystemTopicClient<T>org.apache.pulsar.client.api.PulsarClientExceptionpublic CompletableFuture<SystemTopicClient.Reader<T>> newReaderAsync()
SystemTopicClientnewReaderAsync in interface SystemTopicClient<T>public SystemTopicClient.Writer<T> newWriter() throws org.apache.pulsar.client.api.PulsarClientException
SystemTopicClientnewWriter in interface SystemTopicClient<T>org.apache.pulsar.client.api.PulsarClientExceptionpublic CompletableFuture<SystemTopicClient.Writer<T>> newWriterAsync()
SystemTopicClientnewWriterAsync in interface SystemTopicClient<T>protected abstract CompletableFuture<SystemTopicClient.Writer<T>> newWriterAsyncInternal()
protected abstract CompletableFuture<SystemTopicClient.Reader<T>> newReaderAsyncInternal()
public CompletableFuture<Void> closeAsync()
SystemTopicClientcloseAsync in interface SystemTopicClient<T>public void close()
throws Exception
SystemTopicClientclose in interface SystemTopicClient<T>Exceptionpublic org.apache.pulsar.common.naming.TopicName getTopicName()
SystemTopicClientgetTopicName in interface SystemTopicClient<T>public List<SystemTopicClient.Reader<T>> getReaders()
SystemTopicClientgetReaders in interface SystemTopicClient<T>Set the set of readerspublic List<SystemTopicClient.Writer<T>> getWriters()
SystemTopicClientgetWriters in interface SystemTopicClient<T>Set the set of writersCopyright © 2017–2022 Apache Software Foundation. All rights reserved.