Author: jbellis
Date: Fri Jul 29 05:13:04 2011
New Revision: 1152108

URL: http://svn.apache.org/viewvc?rev=1152108&view=rev
Log:
revert incomplete code

Modified:
    cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java

Modified: 
cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java
URL: 
http://svn.apache.org/viewvc/cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java?rev=1152108&r1=1152107&r2=1152108&view=diff
==============================================================================
--- cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java 
(original)
+++ cassandra/trunk/src/java/org/apache/cassandra/net/MessagingService.java Fri 
Jul 29 05:13:04 2011
@@ -29,7 +29,6 @@ import java.util.*;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.TimeUnit;
 import java.util.concurrent.atomic.AtomicInteger;
-import java.util.concurrent.atomic.AtomicLong;
 import javax.management.MBeanServer;
 import javax.management.ObjectName;
 
@@ -144,19 +143,6 @@ public final class MessagingService impl
             {
                 Pair<InetAddress, IMessageCallback> expiredValue = pair.right;
                 maybeAddLatency(expiredValue.right, expiredValue.left, 
(double) DatabaseDescriptor.getRpcTimeout());
-                totalTimeouts++;
-                String ip = expiredValue.left.getHostAddress();
-                Long c = timeoutsPerHost.get(ip);
-                if (c == null)
-                    timeoutsPerHost.put(ip, 1L);
-                else
-                    timeoutsPerHost.put(ip, c + 1L);
-
-                // we only create AtomicLong instances here, so that the write
-                // access to the hashmap happens single-threadedly.
-                if (recentTimeoutsPerHost.get(ip) == null)
-                    recentTimeoutsPerHost.put(ip, new AtomicLong());
-
                 return null;
             }
         };
@@ -708,36 +694,4 @@ public final class MessagingService impl
         }
         return map;
     }
-
-    public long getTotalTimeouts()
-    {
-        return totalTimeouts;
-    }
-
-    public long getRecentTotalTimouts()
-    {
-        long recent = totalTimeouts - recentTotalTimeouts;
-        recentTotalTimeouts = totalTimeouts;
-        return recent;
-    }
-
-    public Map<String, Long> getTimeoutsPerHost()
-    {
-        return timeoutsPerHost;
-    }
-
-    public Map<String, Long> getRecentTimeoutsPerHost()
-    {
-        Map<String, Long> result = new HashMap<String, Long>();
-        for (Map.Entry<String, Long> entry: timeoutsPerHost.entrySet())
-        {
-            String ip = entry.getKey();
-            Long timeout = entry.getValue();
-            AtomicLong recent = recentTimeoutsPerHost.get(ip);
-            if (recent == null)
-                continue;
-            result.put(ip, timeout - recent.getAndSet(timeout));
-        }
-        return result;
-    }
 }


Reply via email to