You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2011/12/29 20:44:49 UTC

svn commit: r1225627 - in /tomcat/trunk/java/org/apache/naming: ContextBindings.java resources/ProxyDirContext.java resources/ResourceAttributes.java resources/ResourceCache.java

Author: markt
Date: Thu Dec 29 19:44:49 2011
New Revision: 1225627

URL: http://svn.apache.org/viewvc?rev=1225627&view=rev
Log:
UCDetector. Deprecate / add TODOs to currently unused code

Modified:
    tomcat/trunk/java/org/apache/naming/ContextBindings.java
    tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java
    tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java
    tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java

Modified: tomcat/trunk/java/org/apache/naming/ContextBindings.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/ContextBindings.java?rev=1225627&r1=1225626&r2=1225627&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/ContextBindings.java (original)
+++ tomcat/trunk/java/org/apache/naming/ContextBindings.java Thu Dec 29 19:44:49 2011
@@ -43,35 +43,35 @@ public class ContextBindings {
     /**
      * Bindings name - naming context. Keyed by name.
      */
-    private static Hashtable<Object,Context> contextNameBindings =
+    private static final Hashtable<Object,Context> contextNameBindings =
         new Hashtable<Object,Context>();
 
 
     /**
      * Bindings thread - naming context. Keyed by thread id.
      */
-    private static Hashtable<Thread,Context> threadBindings =
+    private static final Hashtable<Thread,Context> threadBindings =
         new Hashtable<Thread,Context>();
 
 
     /**
      * Bindings thread - name. Keyed by thread id.
      */
-    private static Hashtable<Thread,Object> threadNameBindings =
+    private static final Hashtable<Thread,Object> threadNameBindings =
         new Hashtable<Thread,Object>();
 
 
     /**
      * Bindings class loader - naming context. Keyed by CL id.
      */
-    private static Hashtable<ClassLoader,Context> clBindings =
+    private static final Hashtable<ClassLoader,Context> clBindings =
         new Hashtable<ClassLoader,Context>();
 
 
     /**
      * Bindings class loader - name. Keyed by CL id.
      */
-    private static Hashtable<ClassLoader,Object> clNameBindings =
+    private static final Hashtable<ClassLoader,Object> clNameBindings =
         new Hashtable<ClassLoader,Object>();
 
 
@@ -114,7 +114,10 @@ public class ContextBindings {
      * Unbind context name.
      *
      * @param name Name of the context
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void unbindContext(Object name) {
         unbindContext(name, null);
     }
@@ -146,7 +149,10 @@ public class ContextBindings {
      * Binds a naming context to a thread.
      *
      * @param name Name of the context
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void bindThread(Object name)
         throws NamingException {
         bindThread(name, null);
@@ -176,7 +182,10 @@ public class ContextBindings {
      * Unbinds a naming context to a thread.
      *
      * @param name Name of the context
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void unbindThread(Object name) {
         unbindThread(name, null);
     }
@@ -234,7 +243,10 @@ public class ContextBindings {
      * Binds a naming context to a class loader.
      *
      * @param name Name of the context
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void bindClassLoader(Object name)
         throws NamingException {
         bindClassLoader(name, null);
@@ -246,7 +258,10 @@ public class ContextBindings {
      *
      * @param name Name of the context
      * @param token Security token
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void bindClassLoader(Object name, Object token)
         throws NamingException {
         bindClassLoader
@@ -278,7 +293,10 @@ public class ContextBindings {
      * Unbinds a naming context to a class loader.
      *
      * @param name Name of the context
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void unbindClassLoader(Object name) {
         unbindClassLoader(name, null);
     }
@@ -289,7 +307,10 @@ public class ContextBindings {
      *
      * @param name Name of the context
      * @param token Security token
+     *
+     * @deprecated - unused
      */
+    @Deprecated
     public static void unbindClassLoader(Object name, Object token) {
         unbindClassLoader(name, token,
                           Thread.currentThread().getContextClassLoader());

Modified: tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java?rev=1225627&r1=1225626&r2=1225627&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/ProxyDirContext.java Thu Dec 29 19:44:49 2011
@@ -192,7 +192,9 @@ public class ProxyDirContext implements 
 
     /**
      * Return the actual directory context we are wrapping.
+     * @deprecated - unused
      */
+    @Deprecated
     public DirContext getDirContext() {
         return this.dirContext;
     }
@@ -200,7 +202,9 @@ public class ProxyDirContext implements 
 
     /**
      * Return the document root for this component.
+     * @deprecated - unused
      */
+    @Deprecated
     public String getDocBase() {
         if (dirContext instanceof BaseDirContext)
             return ((BaseDirContext) dirContext).getDocBase();

Modified: tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java?rev=1225627&r1=1225626&r2=1225627&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/ResourceAttributes.java Thu Dec 29 19:44:49 2011
@@ -375,7 +375,9 @@ public class ResourceAttributes implemen
      * Set creation.
      *
      * @param creation New creation value
+     * @deprecated - unused
      */
+    @Deprecated
     public void setCreation(long creation) {
         this.creation = creation;
         this.creationDate = null;
@@ -560,7 +562,9 @@ public class ResourceAttributes implemen
      * Last modified date mutator.
      *
      * @param lastModifiedDate New last modified date
+     * @deprecated - unused
      */
+    @Deprecated
     public void setLastModifiedDate(Date lastModifiedDate) {
         this.lastModified = lastModifiedDate.getTime();
         this.lastModifiedDate = lastModifiedDate;
@@ -591,7 +595,9 @@ public class ResourceAttributes implemen
 
     /**
      * @param lastModifiedHttp The lastModifiedHttp to set.
+     * @deprecated - unused
      */
+    @Deprecated
     public void setLastModifiedHttp(String lastModifiedHttp) {
         this.lastModifiedHttp = lastModifiedHttp;
     }

Modified: tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java?rev=1225627&r1=1225626&r2=1225627&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java (original)
+++ tomcat/trunk/java/org/apache/naming/resources/ResourceCache.java Thu Dec 29 19:44:49 2011
@@ -111,6 +111,7 @@ public class ResourceCache {
      * Return the access count.
      * Note: Update is not synced, so the number may not be completely
      * accurate.
+     * TODO: Currently unused. Expose via JMX?
      */
     public long getAccessCount() {
         return accessCount;
@@ -119,6 +120,7 @@ public class ResourceCache {
 
     /**
      * Return the maximum size of the cache in KB.
+     * TODO: Currently unused. Expose via JMX?
      */
     public int getCacheMaxSize() {
         return cacheMaxSize;
@@ -135,6 +137,7 @@ public class ResourceCache {
 
     /**
      * Return the current cache size in KB.
+     * TODO: Currently unused. Expose via JMX?
      */
     public int getCacheSize() {
         return cacheSize;
@@ -143,7 +146,9 @@ public class ResourceCache {
 
     /**
      * Return desired entry access ratio.
+     * @deprecated - unused
      */
+    @Deprecated
     public long getDesiredEntryAccessRatio() {
         return desiredEntryAccessRatio;
     }
@@ -151,7 +156,9 @@ public class ResourceCache {
 
     /**
      * Set the desired entry access ratio.
+     * @deprecated - unused
      */
+    @Deprecated
     public void setDesiredEntryAccessRatio(long desiredEntryAccessRatio) {
         this.desiredEntryAccessRatio = desiredEntryAccessRatio;
     }
@@ -161,6 +168,7 @@ public class ResourceCache {
      * Return the number of cache hits.
      * Note: Update is not synced, so the number may not be completely
      * accurate.
+     * TODO: Currently unused. Expose via JMX?
      */
     public long getHitsCount() {
         return hitsCount;
@@ -169,7 +177,9 @@ public class ResourceCache {
 
     /**
      * Return the maximum amount of iterations during a space allocation.
+     * @deprecated - unused
      */
+    @Deprecated
     public int getMaxAllocateIterations() {
         return maxAllocateIterations;
     }
@@ -177,7 +187,9 @@ public class ResourceCache {
 
     /**
      * Set the maximum amount of iterations during a space allocation.
+     * @deprecated - unused
      */
+    @Deprecated
     public void setMaxAllocateIterations(int maxAllocateIterations) {
         this.maxAllocateIterations = maxAllocateIterations;
     }
@@ -185,7 +197,9 @@ public class ResourceCache {
 
     /**
      * Return the amount of spare not found entries.
+     * @deprecated - unused
      */
+    @Deprecated
     public int getSpareNotFoundEntries() {
         return spareNotFoundEntries;
     }
@@ -193,7 +207,9 @@ public class ResourceCache {
 
     /**
      * Set the amount of spare not found entries.
+     * @deprecated - unused
      */
+    @Deprecated
     public void setSpareNotFoundEntries(int spareNotFoundEntries) {
         this.spareNotFoundEntries = spareNotFoundEntries;
     }



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