Class ClientStats.Sending

java.lang.Object
org.mqtt4j.hato.ClientStats.Sending
Enclosing class:
ClientStats

public static final class ClientStats.Sending extends Object
Outgoing writes and publication exchanges.
  • Method Details

    • operations

      public ClientStats.Usage operations()
      Returns the operation capacity in use, against its limit. A publication holds a slot until just before its future completes, so its continuations can start another operation in its place, and so does each concurrent MqttClient.connect() or MqttClient.disconnect() call beyond the first of each.
      Returns:
      the operation capacity in use, against its limit
    • queuedWrites

      public ClientStats.Usage queuedWrites()
      Returns the writes of any packet that the send queue accepted and has not written yet, against its limit.
      Returns:
      the writes of any packet that the send queue accepted and has not written yet, against its limit
    • queuedBytes

      public ClientStats.Usage queuedBytes()
      Returns the bytes of the writes counted by queuedWrites(), against the send queue's limit.
      Returns:
      the bytes of the writes counted by queuedWrites(), against the send queue's limit
    • awaitingPubAck

      public long awaitingPubAck()
      Returns the number of QoS 1 publications that await PUBACK, including those that wait to be sent.
      Returns:
      the number of QoS 1 publications that await PUBACK, including those that wait to be sent
    • awaitingPubRec

      public long awaitingPubRec()
      Returns the number of QoS 2 publications that await PUBREC, including those that wait to be sent.
      Returns:
      the number of QoS 2 publications that await PUBREC, including those that wait to be sent
    • awaitingPubComp

      public long awaitingPubComp()
      Returns the number of QoS 2 exchanges that await PUBCOMP.
      Returns:
      the number of QoS 2 exchanges that await PUBCOMP
    • publications

      public ClientStats.Usage publications()
      Returns all unfinished QoS 1 and QoS 2 publications, against MqttClientBuilder.maxInflightPublishes(int).
      Returns:
      all unfinished QoS 1 and QoS 2 publications, against MqttClientBuilder.maxInflightPublishes(int)
    • keptBytes

      public ClientStats.Usage keptBytes()
      Returns the bytes that unfinished publications keep, against their limit: a persistent session keeps a publication until PUBACK or PUBREC, and a nonpersistent one only while it waits to be sent.
      Returns:
      the bytes that unfinished publications keep, against their limit: a persistent session keeps a publication until PUBACK or PUBREC, and a nonpersistent one only while it waits to be sent
    • quota

      public OptionalInt quota()
      Returns how many more QoS 1 and QoS 2 publications the established MQTT 5.0 connection lets the client have in progress, within the broker's Receive Maximum; empty without an established MQTT 5.0 connection.
      Returns:
      how many more QoS 1 and QoS 2 publications the established MQTT 5.0 connection lets the client have in progress, within the broker's Receive Maximum; empty without an established MQTT 5.0 connection
    • oldestResponseWait

      public Optional<Duration> oldestResponseWait()
      Returns how long the oldest response that the client awaits, a PUBACK, PUBREC, PUBCOMP, SUBACK, or UNSUBACK, has been awaited since the write that it answers completed; empty if none is awaited. The response timeout of MqttClientBuilder.responseTimeout(Duration) counts from the same time.
      Returns:
      how long the oldest response that the client awaits, a PUBACK, PUBREC, PUBCOMP, SUBACK, or UNSUBACK, has been awaited since the write that it answers completed; empty if none is awaited