This is an automated email from the ASF dual-hosted git repository.

markt pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git

commit 9aad349b607d88215a3398ae0adc4d1818673ef1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Tue Jan 24 13:06:08 2023 +0000

    Deprecate in preparation for switching to LongAddr
---
 java/org/apache/catalina/core/StandardContext.java     |  8 ++++++++
 java/org/apache/catalina/core/StandardWrapper.java     | 18 ++++++++++++++++++
 .../org/apache/catalina/core/StandardWrapperValve.java | 18 ++++++++++++++++++
 3 files changed, 44 insertions(+)

diff --git a/java/org/apache/catalina/core/StandardContext.java 
b/java/org/apache/catalina/core/StandardContext.java
index 8a24d66115..56595da4ff 100644
--- a/java/org/apache/catalina/core/StandardContext.java
+++ b/java/org/apache/catalina/core/StandardContext.java
@@ -4096,7 +4096,11 @@ public class StandardContext extends ContainerBase 
implements Context, Notificat
      * Gets the cumulative request count of all servlets in this 
StandardContext.
      *
      * @return Cumulative request count of all servlets in this StandardContext
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
      */
+    @Deprecated
     public int getRequestCount() {
 
         int result = 0;
@@ -4115,7 +4119,11 @@ public class StandardContext extends ContainerBase 
implements Context, Notificat
      * Gets the cumulative error count of all servlets in this StandardContext.
      *
      * @return Cumulative error count of all servlets in this StandardContext
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
      */
+    @Deprecated
     public int getErrorCount() {
 
         int result = 0;
diff --git a/java/org/apache/catalina/core/StandardWrapper.java 
b/java/org/apache/catalina/core/StandardWrapper.java
index 16b3f0e00b..5d97c7cdf1 100644
--- a/java/org/apache/catalina/core/StandardWrapper.java
+++ b/java/org/apache/catalina/core/StandardWrapper.java
@@ -1205,10 +1205,28 @@ public class StandardWrapper extends ContainerBase 
implements ServletConfig, Wra
         return swValve.getMinTime();
     }
 
+    /**
+     * Returns the number of requests processed by the wrapper.
+     *
+     * @return the number of requests processed by the wrapper.
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
+     */
+    @Deprecated
     public int getRequestCount() {
         return swValve.getRequestCount();
     }
 
+    /**
+     * Returns the number of requests processed by the wrapper that resulted 
in an error.
+     *
+     * @return the number of requests processed by the wrapper that resulted 
in an error.
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
+     */
+    @Deprecated
     public int getErrorCount() {
         return swValve.getErrorCount();
     }
diff --git a/java/org/apache/catalina/core/StandardWrapperValve.java 
b/java/org/apache/catalina/core/StandardWrapperValve.java
index e22d755e01..5d2f0f2456 100644
--- a/java/org/apache/catalina/core/StandardWrapperValve.java
+++ b/java/org/apache/catalina/core/StandardWrapperValve.java
@@ -288,10 +288,28 @@ final class StandardWrapperValve extends ValveBase {
         return minTime;
     }
 
+    /**
+     * Returns the number of requests processed by the associated wrapper.
+     *
+     * @return the number of requests processed by the associated wrapper.
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
+     */
+    @Deprecated
     public int getRequestCount() {
         return requestCount.get();
     }
 
+    /**
+     * Returns the number of requests processed by the associated wrapper that 
resulted in an error.
+     *
+     * @return the number of requests processed by the associated wrapper that 
resulted in an error.
+     *
+     * @deprecated The return type will change to long in Tomcat 11 onwards. 
Callers of this method should switch to
+     *                 storing the result of calls to this method in a long 
value rather than an int.
+     */
+    @Deprecated
     public int getErrorCount() {
         return errorCount.get();
     }


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to