Class ClientStats.Receiving

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

public static final class ClientStats.Receiving extends Object

Incoming publications, their deliveries, and their acknowledgement exchanges.

Each unfinished QoS 1 or QoS 2 reception counts in one stage: awaiting its conditions (a handler, a hand-off acceptor, or ack(), as its AckMode requires), awaiting its turn (its acknowledgement is due but follows an earlier reception, in receive order, or waits for send capacity), awaiting the write of its PUBACK or PUBREC, awaiting PUBREL, or awaiting the write of its PUBCOMP.

  • Method Summary

    Modifier and Type
    Method
    Description
    long
    Returns the number of unfinished receptions whose PUBACK or PUBREC awaits its write.
    long
    Returns the number of QoS 2 receptions whose PUBCOMP awaits its write.
    long
    Returns the number of unfinished receptions whose acknowledgement awaits its conditions.
    long
    Returns the number of QoS 2 receptions that await the broker's PUBREL, which has no deadline.
    long
    Returns the number of unfinished receptions whose acknowledgement is due but awaits its turn.
    long
    Returns a lifetime count of the deliveries that subscriptions took: one for each copy of a received publication that a subscription's buffer took.
    Returns lifetime counts of deliveries that left their subscription unprocessed, by reason, across all subscriptions, including those that have ended.
    Returns the bytes that the deliveries the client holds count against its limit for all subscriptions: the size of each received PUBLISH and an allowance for each of its properties, which take more memory than their encoding.
    Returns the acknowledgement conditions that the client holds for unfinished QoS 1 and QoS 2 receptions, one for each subscription that took a copy, against its limit for all subscriptions.
    Returns the deliveries that the client holds, against its limit for all subscriptions.
    Returns how long the oldest reception that awaits its conditions has done so, which also holds back the acknowledgements counted as awaiting their turn; empty if none does.
    Returns how long the oldest reception that awaits PUBREL has done so; empty if none does.
    long
    Returns a lifetime count of the PUBLISH packets received at qos, retransmissions included.
    Returns all unfinished QoS 1 and QoS 2 receptions, against the client's limit, which includes receptions that a persistent session carries across connections.
    long
    Returns a lifetime count of received publications that matched no subscription.
    long
    Returns a lifetime count of received QoS 0 publications that the client dropped before routing them, because they arrived faster than it could route them.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • publishes

      public long publishes(Qos qos)
      Returns a lifetime count of the PUBLISH packets received at qos, retransmissions included.
      Parameters:
      qos - the QoS of the packets to count
      Returns:
      a lifetime count of the PUBLISH packets received at qos, retransmissions included
    • unmatched

      public long unmatched()
      Returns a lifetime count of received publications that matched no subscription.
      Returns:
      a lifetime count of received publications that matched no subscription
    • unrouted

      public long unrouted()
      Returns a lifetime count of received QoS 0 publications that the client dropped before routing them, because they arrived faster than it could route them. They reach no subscription, and publishes(Qos) counts them.
      Returns:
      a lifetime count of received QoS 0 publications that the client dropped before routing them, because they arrived faster than it could route them
    • deliveries

      public long deliveries()
      Returns a lifetime count of the deliveries that subscriptions took: one for each copy of a received publication that a subscription's buffer took. A retransmission that joins a copy still held adds none, and copies that did not fit, counted under ClientStats.DropReason.SUBSCRIPTION_FULL and ClientStats.DropReason.CLIENT_FULL, are not included.
      Returns:
      a lifetime count of the deliveries that subscriptions took: one for each copy of a received publication that a subscription's buffer took
    • dropped

      public Map<ClientStats.DropReason, Long> dropped()
      Returns lifetime counts of deliveries that left their subscription unprocessed, by reason, across all subscriptions, including those that have ended.
      Returns:
      lifetime counts of deliveries that left their subscription unprocessed, by reason, across all subscriptions, including those that have ended
    • heldDeliveries

      public ClientStats.Usage heldDeliveries()
      Returns the deliveries that the client holds, against its limit for all subscriptions.
      Returns:
      the deliveries that the client holds, against its limit for all subscriptions
    • heldBytes

      public ClientStats.Usage heldBytes()
      Returns the bytes that the deliveries the client holds count against its limit for all subscriptions: the size of each received PUBLISH and an allowance for each of its properties, which take more memory than their encoding.
      Returns:
      the bytes that the deliveries the client holds count against its limit for all subscriptions: the size of each received PUBLISH and an allowance for each of its properties, which take more memory than their encoding
    • heldConditions

      public ClientStats.Usage heldConditions()
      Returns the acknowledgement conditions that the client holds for unfinished QoS 1 and QoS 2 receptions, one for each subscription that took a copy, against its limit for all subscriptions. A reception keeps them until it ends, also after its deliveries were processed, so receptions that wait for an earlier one keep theirs. A reception that would exceed the limit ends the connection, counted under ClientStats.OverloadCause.DELIVERIES.
      Returns:
      the acknowledgement conditions that the client holds for unfinished QoS 1 and QoS 2 receptions, one for each subscription that took a copy, against its limit for all subscriptions
    • awaitingConditions

      public long awaitingConditions()
      Returns the number of unfinished receptions whose acknowledgement awaits its conditions.
      Returns:
      the number of unfinished receptions whose acknowledgement awaits its conditions
    • awaitingTurn

      public long awaitingTurn()
      Returns the number of unfinished receptions whose acknowledgement is due but awaits its turn.
      Returns:
      the number of unfinished receptions whose acknowledgement is due but awaits its turn
    • awaitingAcknowledgementWrite

      public long awaitingAcknowledgementWrite()
      Returns the number of unfinished receptions whose PUBACK or PUBREC awaits its write.
      Returns:
      the number of unfinished receptions whose PUBACK or PUBREC awaits its write
    • awaitingRelease

      public long awaitingRelease()
      Returns the number of QoS 2 receptions that await the broker's PUBREL, which has no deadline.
      Returns:
      the number of QoS 2 receptions that await the broker's PUBREL, which has no deadline
    • awaitingCompletionWrite

      public long awaitingCompletionWrite()
      Returns the number of QoS 2 receptions whose PUBCOMP awaits its write.
      Returns:
      the number of QoS 2 receptions whose PUBCOMP awaits its write
    • receptions

      public ClientStats.Usage receptions()
      Returns all unfinished QoS 1 and QoS 2 receptions, against the client's limit, which includes receptions that a persistent session carries across connections.
      Returns:
      all unfinished QoS 1 and QoS 2 receptions, against the client's limit, which includes receptions that a persistent session carries across connections
    • oldestAwaitingConditions

      public Optional<Duration> oldestAwaitingConditions()
      Returns how long the oldest reception that awaits its conditions has done so, which also holds back the acknowledgements counted as awaiting their turn; empty if none does.
      Returns:
      how long the oldest reception that awaits its conditions has done so, which also holds back the acknowledgements counted as awaiting their turn; empty if none does
    • oldestAwaitingRelease

      public Optional<Duration> oldestAwaitingRelease()
      Returns how long the oldest reception that awaits PUBREL has done so; empty if none does.
      Returns:
      how long the oldest reception that awaits PUBREL has done so; empty if none does