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,org.apache.pulsar.client.api.Producer<T>
-
Nested Class Summary
Nested classes/interfaces inherited from class org.apache.pulsar.client.impl.ProducerBase
ProducerBase.MultiSchemaMode -
Field Summary
FieldsFields inherited from class org.apache.pulsar.client.impl.ProducerBase
conf, interceptors, multiSchemaMode, producerCreatedFuture, schema, schemaCache -
Constructor Summary
ConstructorsConstructorDescriptionPartitionedProducerImpl(PulsarClientImpl client, String topic, ProducerConfigurationData conf, int numPartitions, CompletableFuture<org.apache.pulsar.client.api.Producer<T>> producerCreatedFuture, org.apache.pulsar.client.api.Schema<T> schema, ProducerInterceptors interceptors) -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected booleanprotected booleanprotected org.apache.pulsar.client.impl.HandlerState.StategetAndUpdateState(UnaryOperator<org.apache.pulsar.client.impl.HandlerState.State> updater) longlongintio.netty.util.Timeoutprotected org.apache.pulsar.client.impl.HandlerState.StategetState()getStats()booleanprotected voidsetState(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
-
-
Constructor Details
-
PartitionedProducerImpl
public PartitionedProducerImpl(PulsarClientImpl client, String topic, ProducerConfigurationData conf, int numPartitions, CompletableFuture<org.apache.pulsar.client.api.Producer<T>> producerCreatedFuture, org.apache.pulsar.client.api.Schema<T> schema, ProducerInterceptors interceptors)
-
-
Method Details
-
getProducerName
-
getLastSequenceId
public long getLastSequenceId() -
flushAsync
-
isConnected
public boolean isConnected() -
getLastDisconnectedTimestamp
public long getLastDisconnectedTimestamp() -
closeAsync
- Specified by:
closeAsyncin interfaceorg.apache.pulsar.client.api.Producer<T>- Specified by:
closeAsyncin classProducerBase<T>
-
getStats
-
getProducers
-
getPartitionsAutoUpdateFuture
-
getPartitionsAutoUpdateTimeout
public io.netty.util.Timeout getPartitionsAutoUpdateTimeout() -
getOriginalLastSendFuture
-
getNumOfPartitions
public int getNumOfPartitions() -
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
-