Class 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>
    • Field Detail

      • 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 interface org.apache.pulsar.client.api.Producer<T>
        Specified by:
        closeAsync in class ProducerBase<T>
      • 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)