public class PulsarClientImpl extends Object implements PulsarClient
| Modifier and Type | Class and Description |
|---|---|
static class |
PulsarClientImpl.State |
| Constructor and Description |
|---|
PulsarClientImpl(ClientConfigurationData conf) |
PulsarClientImpl(ClientConfigurationData conf,
io.netty.channel.EventLoopGroup eventLoopGroup) |
PulsarClientImpl(ClientConfigurationData conf,
io.netty.channel.EventLoopGroup eventLoopGroup,
ConnectionPool cnxPool) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbuilderpublic PulsarClientImpl(ClientConfigurationData conf) throws PulsarClientException
PulsarClientExceptionpublic PulsarClientImpl(ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup) throws PulsarClientException
PulsarClientExceptionpublic PulsarClientImpl(ClientConfigurationData conf, io.netty.channel.EventLoopGroup eventLoopGroup, ConnectionPool cnxPool) throws PulsarClientException
PulsarClientExceptionpublic ClientConfigurationData getConfiguration()
public Clock getClientClock()
public AtomicReference<PulsarClientImpl.State> getState()
public ProducerBuilder<byte[]> newProducer()
newProducer in interface PulsarClientpublic <T> ProducerBuilder<T> newProducer(Schema<T> schema)
newProducer in interface PulsarClientpublic ConsumerBuilder<byte[]> newConsumer()
newConsumer in interface PulsarClientpublic <T> ConsumerBuilder<T> newConsumer(Schema<T> schema)
newConsumer in interface PulsarClientpublic ReaderBuilder<byte[]> newReader()
newReader in interface PulsarClientpublic <T> ReaderBuilder<T> newReader(Schema<T> schema)
newReader in interface PulsarClientpublic CompletableFuture<Producer<byte[]>> createProducerAsync(ProducerConfigurationData conf)
public <T> CompletableFuture<Producer<T>> createProducerAsync(ProducerConfigurationData conf, Schema<T> schema)
public <T> CompletableFuture<Producer<T>> createProducerAsync(ProducerConfigurationData conf, Schema<T> schema, ProducerInterceptors interceptors)
public CompletableFuture<Consumer<byte[]>> subscribeAsync(ConsumerConfigurationData<byte[]> conf)
public <T> CompletableFuture<Consumer<T>> subscribeAsync(ConsumerConfigurationData<T> conf, Schema<T> schema, ConsumerInterceptors<T> interceptors)
public CompletableFuture<Consumer<byte[]>> patternTopicSubscribeAsync(ConsumerConfigurationData<byte[]> conf)
public static List<String> topicsPatternFilter(List<String> original, Pattern topicsPattern)
public CompletableFuture<Reader<byte[]>> createReaderAsync(ReaderConfigurationData<byte[]> conf)
public <T> CompletableFuture<Reader<T>> createReaderAsync(ReaderConfigurationData<T> conf, Schema<T> schema)
public CompletableFuture<Optional<SchemaInfo>> getSchema(String topic)
public void close()
throws PulsarClientException
close in interface Closeableclose in interface AutoCloseableclose in interface PulsarClientPulsarClientExceptionpublic CompletableFuture<Void> closeAsync()
closeAsync in interface PulsarClientpublic void shutdown()
throws PulsarClientException
shutdown in interface PulsarClientPulsarClientExceptionpublic void updateServiceUrl(String serviceUrl) throws PulsarClientException
updateServiceUrl in interface PulsarClientPulsarClientExceptionprotected CompletableFuture<ClientCnx> getConnection(String topic)
public io.netty.util.Timer timer()
public long newRequestId()
public ConnectionPool getCnxPool()
public io.netty.channel.EventLoopGroup eventLoopGroup()
public LookupService getLookup()
public void reloadLookUp()
throws PulsarClientException
PulsarClientExceptionpublic CompletableFuture<Integer> getNumberOfPartitions(String topic)
public CompletableFuture<PartitionedTopicMetadata> getPartitionedTopicMetadata(String topic)
public CompletableFuture<List<String>> getPartitionsForTopic(String topic)
getPartitionsForTopic in interface PulsarClientprotected <T> CompletableFuture<Schema<T>> preProcessSchemaBeforeSubscribe(PulsarClientImpl pulsarClientImpl, Schema<T> schema, String topicName)
public TransactionBuilder newTransaction()
Copyright © 2017–2020 Apache Software Foundation. All rights reserved.