Package org.apache.pulsar.client.impl
Class PartitionedProducerImpl<T>
- java.lang.Object
-
- org.apache.pulsar.client.impl.ProducerBase<T>
-
- org.apache.pulsar.client.impl.PartitionedProducerImpl<T>
-
- All Implemented Interfaces:
java.io.Closeable
,java.lang.AutoCloseable
,org.apache.pulsar.client.api.Producer<T>
public class PartitionedProducerImpl<T> extends ProducerBase<T>
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.apache.pulsar.client.impl.ProducerBase
ProducerBase.MultiSchemaMode
-
-
Field Summary
Fields Modifier and Type Field Description protected PulsarClientImpl
client
protected java.lang.String
topic
-
Fields inherited from class org.apache.pulsar.client.impl.ProducerBase
conf, interceptors, multiSchemaMode, producerCreatedFuture, schema, schemaCache
-
-
Constructor Summary
Constructors Constructor Description PartitionedProducerImpl(PulsarClientImpl client, java.lang.String topic, ProducerConfigurationData conf, int numPartitions, java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Producer<T>> producerCreatedFuture, org.apache.pulsar.client.api.Schema<T> schema, ProducerInterceptors interceptors)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected boolean
changeToConnecting()
protected boolean
changeToReadyState()
protected boolean
changeToRegisteringSchemaState()
java.util.concurrent.CompletableFuture<java.lang.Void>
closeAsync()
java.util.concurrent.CompletableFuture<java.lang.Void>
flushAsync()
protected org.apache.pulsar.client.impl.HandlerState.State
getAndUpdateState(java.util.function.UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater)
PulsarClientImpl
getClient()
long
getLastDisconnectedTimestamp()
long
getLastSequenceId()
io.netty.util.Timeout
getPartitionsAutoUpdateTimeout()
java.lang.String
getProducerName()
java.util.List<ProducerImpl<T>>
getProducers()
protected org.apache.pulsar.client.impl.HandlerState.State
getState()
ProducerStatsRecorderImpl
getStats()
boolean
isConnected()
protected void
setState(org.apache.pulsar.client.impl.HandlerState.State s)
-
Methods inherited from class org.apache.pulsar.client.impl.ProducerBase
beforeSend, close, flush, getConfiguration, getTopic, newMessage, newMessage, newMessage, onSendAcknowledgement, producerCreatedFuture, send, send, sendAsync, sendAsync, toString
-
-
-
-
Field Detail
-
client
protected final PulsarClientImpl client
-
topic
protected final java.lang.String topic
-
-
Constructor Detail
-
PartitionedProducerImpl
public PartitionedProducerImpl(PulsarClientImpl client, java.lang.String topic, ProducerConfigurationData conf, int numPartitions, java.util.concurrent.CompletableFuture<org.apache.pulsar.client.api.Producer<T>> producerCreatedFuture, org.apache.pulsar.client.api.Schema<T> schema, ProducerInterceptors interceptors)
-
-
Method Detail
-
getProducerName
public java.lang.String getProducerName()
-
getLastSequenceId
public long getLastSequenceId()
-
flushAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> flushAsync()
-
isConnected
public boolean isConnected()
-
getLastDisconnectedTimestamp
public long getLastDisconnectedTimestamp()
-
closeAsync
public java.util.concurrent.CompletableFuture<java.lang.Void> closeAsync()
- Specified by:
closeAsync
in interfaceorg.apache.pulsar.client.api.Producer<T>
- Specified by:
closeAsync
in classProducerBase<T>
-
getStats
public ProducerStatsRecorderImpl getStats()
-
getProducers
public java.util.List<ProducerImpl<T>> getProducers()
-
getPartitionsAutoUpdateTimeout
public io.netty.util.Timeout getPartitionsAutoUpdateTimeout()
-
changeToReadyState
protected boolean changeToReadyState()
-
changeToRegisteringSchemaState
protected boolean changeToRegisteringSchemaState()
-
getState
protected org.apache.pulsar.client.impl.HandlerState.State getState()
-
changeToConnecting
protected boolean changeToConnecting()
-
setState
protected void setState(org.apache.pulsar.client.impl.HandlerState.State s)
-
getAndUpdateState
protected org.apache.pulsar.client.impl.HandlerState.State getAndUpdateState(java.util.function.UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater)
-
getClient
public PulsarClientImpl getClient()
-
-