Class SystemTopicClientBase<T>
- java.lang.Object
-
- org.apache.pulsar.broker.systopic.SystemTopicClientBase<T>
-
- All Implemented Interfaces:
SystemTopicClient<T>
- Direct Known Subclasses:
TopicPoliciesSystemTopicClient,TransactionBufferSystemTopicClient
public abstract class SystemTopicClientBase<T> extends java.lang.Object implements SystemTopicClient<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pulsar.broker.systopic.SystemTopicClient
SystemTopicClient.Reader<T>, SystemTopicClient.Writer<T>
-
-
Field Summary
Fields Modifier and Type Field Description protected org.apache.pulsar.client.api.PulsarClientclientprotected java.util.List<SystemTopicClient.Reader<T>>readersprotected org.apache.pulsar.common.naming.TopicNametopicNameprotected java.util.List<SystemTopicClient.Writer<T>>writers
-
Constructor Summary
Constructors Constructor Description SystemTopicClientBase(org.apache.pulsar.client.api.PulsarClient client, org.apache.pulsar.common.naming.TopicName topicName)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidclose()Close the system topic.java.util.concurrent.CompletableFuture<java.lang.Void>closeAsync()Close the system topic asynchronously.java.util.List<SystemTopicClient.Reader<T>>getReaders()Get all readers of the system topic.org.apache.pulsar.common.naming.TopicNamegetTopicName()Get topic name of the system topic.java.util.List<SystemTopicClient.Writer<T>>getWriters()Get all writers of the system topic.SystemTopicClient.Reader<T>newReader()Create a reader for the system topic.java.util.concurrent.CompletableFuture<SystemTopicClient.Reader<T>>newReaderAsync()Create a reader for the system topic asynchronously.protected abstract java.util.concurrent.CompletableFuture<SystemTopicClient.Reader<T>>newReaderAsyncInternal()SystemTopicClient.Writer<T>newWriter()Create a writer for the system topic.java.util.concurrent.CompletableFuture<SystemTopicClient.Writer<T>>newWriterAsync()Create a writer for the system topic asynchronously.protected abstract java.util.concurrent.CompletableFuture<SystemTopicClient.Writer<T>>newWriterAsyncInternal()
-
-
-
Field Detail
-
topicName
protected final org.apache.pulsar.common.naming.TopicName topicName
-
client
protected final org.apache.pulsar.client.api.PulsarClient client
-
writers
protected final java.util.List<SystemTopicClient.Writer<T>> writers
-
readers
protected final java.util.List<SystemTopicClient.Reader<T>> readers
-
-
Method Detail
-
newReader
public SystemTopicClient.Reader<T> newReader() throws org.apache.pulsar.client.api.PulsarClientException
Description 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
public java.util.concurrent.CompletableFuture<SystemTopicClient.Reader<T>> 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.PulsarClientException
Description 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
public java.util.concurrent.CompletableFuture<SystemTopicClient.Writer<T>> newWriterAsync()
Description copied from interface:SystemTopicClientCreate a writer for the system topic asynchronously.- Specified by:
newWriterAsyncin interfaceSystemTopicClient<T>
-
newWriterAsyncInternal
protected abstract java.util.concurrent.CompletableFuture<SystemTopicClient.Writer<T>> newWriterAsyncInternal()
-
newReaderAsyncInternal
protected abstract java.util.concurrent.CompletableFuture<SystemTopicClient.Reader<T>> newReaderAsyncInternal()
-
closeAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
Description copied from interface:SystemTopicClientClose the system topic asynchronously.- Specified by:
closeAsyncin interfaceSystemTopicClient<T>- Returns:
-
close
public void close() throws java.lang.ExceptionDescription copied from interface:SystemTopicClientClose the system topic.- Specified by:
closein interfaceSystemTopicClient<T>- Throws:
java.lang.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
public java.util.List<SystemTopicClient.Reader<T>> getReaders()
Description copied from interface:SystemTopicClientGet all readers of the system topic.- Specified by:
getReadersin interfaceSystemTopicClient<T>- Returns:
Setthe set of readers
-
getWriters
public java.util.List<SystemTopicClient.Writer<T>> getWriters()
Description copied from interface:SystemTopicClientGet all writers of the system topic.- Specified by:
getWritersin interfaceSystemTopicClient<T>- Returns:
Setthe set of writers
-
-