Package org.apache.pulsar.client.impl
Class ProducerStatsRecorderImpl
java.lang.Object
org.apache.pulsar.client.impl.ProducerStatsRecorderImpl
- All Implemented Interfaces:
Serializable,ProducerStats,ProducerStatsRecorder
- Direct Known Subclasses:
PartitionedTopicProducerStatsRecorderImpl
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionProducerStatsRecorderImpl(PulsarClientImpl pulsarClient, ProducerConfigurationData conf, ProducerImpl<?> producer) -
Method Summary
Modifier and TypeMethodDescriptionvoidlonglonglonglongintdoubledoubledoubledoubledoubledoubledoubledoublelonglonglonglongvoidincrementNumAcksReceived(long latencyNs) voidvoidincrementSendFailed(long numMsgs) voidupdateNumMsgsSent(long numMsgs, long totalMsgsSize) protected voidMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.pulsar.client.api.ProducerStats
getPartitionStats
-
Constructor Details
-
ProducerStatsRecorderImpl
public ProducerStatsRecorderImpl() -
ProducerStatsRecorderImpl
public ProducerStatsRecorderImpl(PulsarClientImpl pulsarClient, ProducerConfigurationData conf, ProducerImpl<?> producer)
-
-
Method Details
-
updateStats
protected void updateStats() -
updateNumMsgsSent
public void updateNumMsgsSent(long numMsgs, long totalMsgsSize) - Specified by:
updateNumMsgsSentin interfaceProducerStatsRecorder
-
incrementSendFailed
public void incrementSendFailed()- Specified by:
incrementSendFailedin interfaceProducerStatsRecorder
-
incrementSendFailed
public void incrementSendFailed(long numMsgs) - Specified by:
incrementSendFailedin interfaceProducerStatsRecorder
-
incrementNumAcksReceived
public void incrementNumAcksReceived(long latencyNs) - Specified by:
incrementNumAcksReceivedin interfaceProducerStatsRecorder
-
getNumMsgsSent
public long getNumMsgsSent()- Specified by:
getNumMsgsSentin interfaceProducerStats
-
getNumBytesSent
public long getNumBytesSent()- Specified by:
getNumBytesSentin interfaceProducerStats
-
getNumSendFailed
public long getNumSendFailed()- Specified by:
getNumSendFailedin interfaceProducerStats
-
getNumAcksReceived
public long getNumAcksReceived()- Specified by:
getNumAcksReceivedin interfaceProducerStats
-
getTotalMsgsSent
public long getTotalMsgsSent()- Specified by:
getTotalMsgsSentin interfaceProducerStats
-
getTotalBytesSent
public long getTotalBytesSent()- Specified by:
getTotalBytesSentin interfaceProducerStats
-
getTotalSendFailed
public long getTotalSendFailed()- Specified by:
getTotalSendFailedin interfaceProducerStats
-
getTotalAcksReceived
public long getTotalAcksReceived()- Specified by:
getTotalAcksReceivedin interfaceProducerStats
-
getSendMsgsRate
public double getSendMsgsRate()- Specified by:
getSendMsgsRatein interfaceProducerStats
-
getSendBytesRate
public double getSendBytesRate()- Specified by:
getSendBytesRatein interfaceProducerStats
-
getSendLatencyMillis50pct
public double getSendLatencyMillis50pct()- Specified by:
getSendLatencyMillis50pctin interfaceProducerStats
-
getSendLatencyMillis75pct
public double getSendLatencyMillis75pct()- Specified by:
getSendLatencyMillis75pctin interfaceProducerStats
-
getSendLatencyMillis95pct
public double getSendLatencyMillis95pct()- Specified by:
getSendLatencyMillis95pctin interfaceProducerStats
-
getSendLatencyMillis99pct
public double getSendLatencyMillis99pct()- Specified by:
getSendLatencyMillis99pctin interfaceProducerStats
-
getSendLatencyMillis999pct
public double getSendLatencyMillis999pct()- Specified by:
getSendLatencyMillis999pctin interfaceProducerStats
-
getSendLatencyMillisMax
public double getSendLatencyMillisMax()- Specified by:
getSendLatencyMillisMaxin interfaceProducerStats
-
getPendingQueueSize
public int getPendingQueueSize()- Specified by:
getPendingQueueSizein interfaceProducerStats
-
cancelStatsTimeout
public void cancelStatsTimeout()- Specified by:
cancelStatsTimeoutin interfaceProducerStatsRecorder
-