1 /** 2 * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. 3 * SPDX-License-Identifier: Apache-2.0. 4 */ 5 package software.amazon.awssdk.crt.mqtt5; 6 7 /** 8 * Simple statistics about the current state of the client's queue of operations 9 */ 10 public class Mqtt5ClientOperationStatistics { 11 12 private long incompleteOperationCount; 13 private long incompleteOperationSize; 14 private long unackedOperationCount; 15 private long unackedOperationSize; 16 Mqtt5ClientOperationStatistics()17 public Mqtt5ClientOperationStatistics() {} 18 19 /** 20 * Returns the total number of operations submitted to the client that have not yet been completed. 21 * Note: Unacked operations are a subset of this. 22 * @return Total number of operations submitted to the client that have not yet been completed 23 */ getIncompleteOperationCount()24 public long getIncompleteOperationCount() { 25 return incompleteOperationCount; 26 } 27 28 /** 29 * Returns the total packet size of operations submitted to the client that have not yet been completed. 30 * Note: Unacked operations are a subset of this. 31 * @return Total packet size of operations submitted to the client that have not yet been completed 32 */ getIncompleteOperationSize()33 public long getIncompleteOperationSize() { 34 return incompleteOperationSize; 35 } 36 37 /** 38 * Returns the total number of operations that have been sent and are waiting for a corresponding ACK before 39 * they can be completed. 40 * @return Total number of operations that have been sent and are waiting for a corresponding ACK 41 */ getUnackedOperationCount()42 public long getUnackedOperationCount() { 43 return unackedOperationCount; 44 } 45 46 /** 47 * Returns the total packet size of operations that have been sent and are waiting for a corresponding ACK before 48 * they can be completed. 49 * @return Total packet size of operations that have been sent and are waiting for a corresponding ACK 50 */ getUnackedOperationSize()51 public long getUnackedOperationSize() { 52 return unackedOperationSize; 53 } 54 } 55