Java 8 has reached end of support
and will be
deprecated
on January 31, 2026. After deprecation, you won't be able to deploy Java 8
applications, even if your organization previously used an organization policy to
re-enable deployments of legacy runtimes. Your existing Java
8 applications will continue to run and receive traffic after their
deprecation date. We recommend that
you
migrate to the latest supported version of Java.
QueueStatistics (Google App Engine API for Java)
Stay organized with collections
Save and categorize content based on your preferences.
- java.lang.Object
-
- com.google.appengine.api.taskqueue.QueueStatistics
-
public final class QueueStatistics
extends java.lang.Object
QueueStatistics
allow observation of the rate that tasks on a given
queue are being executed. Note that statistics provided are only approximate,
and some statistics may be delayed or transiently unavailable.
-
-
Method Summary
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Method Detail
-
getQueueName
public java.lang.String getQueueName()
- Returns:
- The name of the
Queue
.
-
getNumTasks
public int getNumTasks()
- Returns:
- The approximate number of non-completed tasks in the queue.
-
getExecutedLastMinute
public long getExecutedLastMinute()
- Returns:
- The number of tasks executed in the last minute.
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-06-16 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-06-16 UTC."],[[["\u003cp\u003e\u003ccode\u003eQueueStatistics\u003c/code\u003e provides a way to observe the approximate rate at which tasks are being executed on a specific queue.\u003c/p\u003e\n"],["\u003cp\u003eThe class offers methods to get the queue's name, the approximate number of non-completed tasks, and a recent estimate of the oldest task's eta.\u003c/p\u003e\n"],["\u003cp\u003eIt also allows retrieving the number of tasks executed in the last minute and the number of requests that the queue has sent but not yet received a reply for.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egetEnforcedRate\u003c/code\u003e method returns the maximum number of tasks per second that are being processed by the queue.\u003c/p\u003e\n"]]],[],null,["# QueueStatistics (Google App Engine API for Java)\n\ncom.google.appengine.api.taskqueue\n\nClass QueueStatistics\n---------------------\n\n- java.lang.Object\n-\n - com.google.appengine.api.taskqueue.QueueStatistics\n\n-\n\n *** ** * ** ***\n\n \u003cbr /\u003e\n\n ```\n public final class QueueStatistics\n extends java.lang.Object\n ``` \n[`QueueStatistics`](../../../../../com/google/appengine/api/taskqueue/QueueStatistics.html \"class in com.google.appengine.api.taskqueue\") allow observation of the rate that tasks on a given queue are being executed. Note that statistics provided are only approximate, and some statistics may be delayed or transiently unavailable. \n-\n -\n\n ### Method Summary\n\n -\n\n ### Methods inherited from class java.lang.Object\n\n`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait` \n-\n -\n\n ### Method Detail\n\n\n -\n\n #### getQueueName\n\n ```\n public java.lang.String getQueueName()\n ```\n\n Returns:\n : The name of the [`Queue`](../../../../../com/google/appengine/api/taskqueue/Queue.html \"interface in com.google.appengine.api.taskqueue\").\n\n\n -\n\n #### getNumTasks\n\n ```\n public int getNumTasks()\n ```\n\n Returns:\n : The approximate number of non-completed tasks in the queue.\n\n\n -\n\n #### getOldestEtaUsec\n\n ```\n public java.lang.Long getOldestEtaUsec()\n ``` \n Returns a recent estimate of the eta of the oldest non-completed task in the queue.\n\n Returns:\n : The eta of the oldest non-completed task for the queue, or\n `null` if there were no non-completed tasks found in the queue.\n\n\n -\n\n #### getExecutedLastMinute\n\n ```\n public long getExecutedLastMinute()\n ```\n\n Returns:\n : The number of tasks executed in the last minute.\n\n\n -\n\n #### getRequestsInFlight\n\n ```\n public int getRequestsInFlight()\n ``` \n The number of requests that the queue has sent but not yet received a reply for.\n\n Returns:\n : The number of tasks currently in flight.\n\n\n -\n\n #### getEnforcedRate\n\n ```\n public double getEnforcedRate()\n ``` \n Returns the maximum number of tasks per second being run by this queue.\n\n Returns:\n : The enforced rate in tasks per second."]]