Class SystemTopicClientBase<T>
java.lang.Object
org.apache.pulsar.broker.systopic.SystemTopicClientBase<T>
- All Implemented Interfaces:
SystemTopicClient<T>
- Direct Known Subclasses:
TopicPoliciesSystemTopicClient,TransactionBufferSystemTopicClient
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.pulsar.broker.systopic.SystemTopicClient
SystemTopicClient.Reader<T>, SystemTopicClient.Writer<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final org.apache.pulsar.client.api.PulsarClientprotected final List<SystemTopicClient.Reader<T>>protected final org.apache.pulsar.common.naming.TopicNameprotected final List<SystemTopicClient.Writer<T>> -
Constructor Summary
ConstructorsConstructorDescriptionSystemTopicClientBase(org.apache.pulsar.client.api.PulsarClient client, org.apache.pulsar.common.naming.TopicName topicName) -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Close the system topic.Close the system topic asynchronously.Get all readers of the system topic.org.apache.pulsar.common.naming.TopicNameGet topic name of the system topic.Get all writers of the system topic.Create a reader for the system topic.Create a reader for the system topic asynchronously.protected abstract CompletableFuture<SystemTopicClient.Reader<T>>Create a writer for the system topic.Create a writer for the system topic asynchronously.protected abstract CompletableFuture<SystemTopicClient.Writer<T>>
-
Field Details
-
topicName
protected final org.apache.pulsar.common.naming.TopicName topicName -
client
protected final org.apache.pulsar.client.api.PulsarClient client -
writers
-
readers
-
-
Constructor Details
-
SystemTopicClientBase
public SystemTopicClientBase(org.apache.pulsar.client.api.PulsarClient client, org.apache.pulsar.common.naming.TopicName topicName)
-
-
Method Details
-
newReader
public SystemTopicClient.Reader<T> newReader() throws org.apache.pulsar.client.api.PulsarClientExceptionDescription copied from interface:SystemTopicClientCreate a reader for the system topic.- Specified by:
newReaderin interfaceSystemTopicClient<T>- Returns:
- a new reader for the system topic
- Throws:
org.apache.pulsar.client.api.PulsarClientException
-
newReaderAsync
Description copied from interface:SystemTopicClientCreate a reader for the system topic asynchronously.- Specified by:
newReaderAsyncin interfaceSystemTopicClient<T>
-
newWriter
public SystemTopicClient.Writer<T> newWriter() throws org.apache.pulsar.client.api.PulsarClientExceptionDescription copied from interface:SystemTopicClientCreate a writer for the system topic.- Specified by:
newWriterin interfaceSystemTopicClient<T>- Returns:
- writer for the system topic
- Throws:
org.apache.pulsar.client.api.PulsarClientException
-
newWriterAsync
Description copied from interface:SystemTopicClientCreate a writer for the system topic asynchronously.- Specified by:
newWriterAsyncin interfaceSystemTopicClient<T>
-
newWriterAsyncInternal
-
newReaderAsyncInternal
-
closeAsync
Description copied from interface:SystemTopicClientClose the system topic asynchronously.- Specified by:
closeAsyncin interfaceSystemTopicClient<T>- Returns:
-
close
Description copied from interface:SystemTopicClientClose the system topic.- Specified by:
closein interfaceSystemTopicClient<T>- Throws:
Exception
-
getTopicName
public org.apache.pulsar.common.naming.TopicName getTopicName()Description copied from interface:SystemTopicClientGet topic name of the system topic.- Specified by:
getTopicNamein interfaceSystemTopicClient<T>- Returns:
- topic name
-
getReaders
Description copied from interface:SystemTopicClientGet all readers of the system topic.- Specified by:
getReadersin interfaceSystemTopicClient<T>- Returns:
Setthe set of readers
-
getWriters
Description copied from interface:SystemTopicClientGet all writers of the system topic.- Specified by:
getWritersin interfaceSystemTopicClient<T>- Returns:
Setthe set of writers
-