You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by jb...@apache.org on 2012/09/03 17:38:19 UTC
git commit: finish renaming entry variables
Updated Branches:
refs/heads/trunk 9c80f37d5 -> ae6a58fd7
finish renaming entry variables
Project: http://git-wip-us.apache.org/repos/asf/cassandra/repo
Commit: http://git-wip-us.apache.org/repos/asf/cassandra/commit/ae6a58fd
Tree: http://git-wip-us.apache.org/repos/asf/cassandra/tree/ae6a58fd
Diff: http://git-wip-us.apache.org/repos/asf/cassandra/diff/ae6a58fd
Branch: refs/heads/trunk
Commit: ae6a58fd71fc6b98316cdfcbfaecb74f595c3ece
Parents: 9c80f37
Author: Jonathan Ellis <jb...@apache.org>
Authored: Mon Sep 3 10:38:03 2012 -0500
Committer: Jonathan Ellis <jb...@apache.org>
Committed: Mon Sep 3 10:38:03 2012 -0500
----------------------------------------------------------------------
.../cassandra/net/OutboundTcpConnection.java | 24 +++++++-------
1 files changed, 12 insertions(+), 12 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cassandra/blob/ae6a58fd/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
index 5572162..c0c1bf2 100644
--- a/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
+++ b/src/java/org/apache/cassandra/net/OutboundTcpConnection.java
@@ -104,13 +104,13 @@ public class OutboundTcpConnection extends Thread
{
while (true)
{
- QueuedMessage entry = active.poll();
- if (entry == null)
+ QueuedMessage qm = active.poll();
+ if (qm == null)
{
// exhausted the active queue. switch to backlog, once there's something to process there
try
{
- entry = backlog.take();
+ qm = backlog.take();
}
catch (InterruptedException e)
{
@@ -122,14 +122,14 @@ public class OutboundTcpConnection extends Thread
active = tmp;
}
- MessageOut<?> m = entry.message;
- String id = entry.id;
+ MessageOut<?> m = qm.message;
+ String id = qm.id;
if (m == CLOSE_SENTINEL)
{
disconnect();
continue;
}
- if (entry.timestamp < System.currentTimeMillis() - m.getTimeout())
+ if (qm.timestamp < System.currentTimeMillis() - m.getTimeout())
dropped.incrementAndGet();
else if (socket != null || connect())
writeConnected(m, id);
@@ -309,18 +309,18 @@ public class OutboundTcpConnection extends Thread
{
while (true)
{
- QueuedMessage message = backlog.peek();
- if (message == null || message.timestamp >= System.currentTimeMillis() - message.message.getTimeout())
+ QueuedMessage qm = backlog.peek();
+ if (qm == null || qm.timestamp >= System.currentTimeMillis() - qm.message.getTimeout())
break;
- QueuedMessage message2 = backlog.poll();
- if (message2 != message)
+ QueuedMessage qm2 = backlog.poll();
+ if (qm2 != qm)
{
// sending thread switched queues. add this entry (from the "new" backlog)
// at the end of the active queue, which keeps it in the same position relative to the other entries
// without having to contend with other clients for the head-of-backlog lock.
- if (message2 != null)
- active.add(message2);
+ if (qm2 != null)
+ active.add(qm2);
break;
}