You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by se...@apache.org on 2014/04/04 00:34:33 UTC

svn commit: r1584435 - in /commons/proper/jcs/trunk/src: changes/changes.xml java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java

Author: sebb
Date: Thu Apr  3 22:34:33 2014
New Revision: 1584435

URL: http://svn.apache.org/r1584435
Log:
JCS-112 RemoteCacheServer.logUpdateInfo bug updating put count

Modified:
    commons/proper/jcs/trunk/src/changes/changes.xml
    commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java

Modified: commons/proper/jcs/trunk/src/changes/changes.xml
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/changes/changes.xml?rev=1584435&r1=1584434&r2=1584435&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/changes/changes.xml (original)
+++ commons/proper/jcs/trunk/src/changes/changes.xml Thu Apr  3 22:34:33 2014
@@ -20,6 +20,9 @@
 	</properties>
 	<body>
 		<release version="2.0" date="unreleased" description="JDK 1.6 based major release">
+            <action issue="JCS-112" dev="sebb" type="fix">
+                RemoteCacheServer.logUpdateInfo bug updating put count
+            </action>
             <action dev="tv" type="fix">
                 Fix updating of last access time, add tests for event handling
             </action>

Modified: commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java
URL: http://svn.apache.org/viewvc/commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java?rev=1584435&r1=1584434&r2=1584435&view=diff
==============================================================================
--- commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java (original)
+++ commons/proper/jcs/trunk/src/java/org/apache/commons/jcs/auxiliary/remote/server/RemoteCacheServer.java Thu Apr  3 22:34:33 2014
@@ -385,10 +385,11 @@ public class RemoteCacheServer<K extends
      */
     private void logUpdateInfo( ICacheElement<K, V> item )
     {
+        // not thread safe, but it doesn't have to be 100% accurate
+        puts++;
+
         if ( log.isInfoEnabled() )
         {
-            // not thread safe, but it doesn't have to be accurate
-            puts++;
             if ( puts % logInterval == 0 )
             {
                 log.info( "puts = " + puts );
@@ -1066,7 +1067,8 @@ public class RemoteCacheServer<K extends
      * <p>
      * @return puts
      */
-    protected int getPutCount()
+    // Currently only intended for use by unit tests
+    int getPutCount()
     {
         return puts;
     }