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:
Closeable
,AutoCloseable
,Producer<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pulsar.client.impl.ProducerBase
ProducerBase.MultiSchemaMode
-
Field Summary
Modifier and TypeFieldDescriptionprotected final PulsarClientImpl
protected URI
protected final String
Fields inherited from class org.apache.pulsar.client.impl.ProducerBase
conf, interceptors, multiSchemaMode, producerCreatedFuture, schema, schemaCache
-
Constructor Summary
ConstructorDescriptionPartitionedProducerImpl
(PulsarClientImpl client, String topic, ProducerConfigurationData conf, int numPartitions, CompletableFuture<Producer<T>> producerCreatedFuture, Schema<T> schema, ProducerInterceptors interceptors) -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
protected boolean
protected boolean
protected org.apache.pulsar.client.impl.HandlerState.State
getAndUpdateState
(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) long
long
int
io.netty.util.Timeout
protected org.apache.pulsar.client.impl.HandlerState.State
getState()
getStats()
boolean
protected void
setRedirectedClusterURI
(String serviceUrl, String serviceUrlTls) 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, onPartitionsChange, onSendAcknowledgement, producerCreatedFuture, send, send, sendAsync, sendAsync, toString
-
Field Details
-
client
-
topic
-
redirectedClusterURI
-
-
Constructor Details
-
PartitionedProducerImpl
public PartitionedProducerImpl(PulsarClientImpl client, String topic, ProducerConfigurationData conf, int numPartitions, CompletableFuture<Producer<T>> producerCreatedFuture, Schema<T> schema, ProducerInterceptors interceptors)
-
-
Method Details
-
getProducerName
-
getLastSequenceId
public long getLastSequenceId() -
flushAsync
-
isConnected
public boolean isConnected() -
getLastDisconnectedTimestamp
public long getLastDisconnectedTimestamp() -
closeAsync
- Specified by:
closeAsync
in interfaceProducer<T>
- Specified by:
closeAsync
in classProducerBase<T>
-
getStats
-
getProducers
-
getPartitionsAutoUpdateFuture
-
getPartitionsAutoUpdateTimeout
public io.netty.util.Timeout getPartitionsAutoUpdateTimeout() -
getOriginalLastSendFuture
-
getNumOfPartitions
public int getNumOfPartitions() -
setRedirectedClusterURI
protected void setRedirectedClusterURI(String serviceUrl, String serviceUrlTls) throws URISyntaxException - Throws:
URISyntaxException
-
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(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) -
getClient
-