diff src/alice/datasegment/DataSegmentManager.java @ 68:d4c7f7b1096b

remove copy at OutboundTcpConnection
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Sat, 11 Feb 2012 16:40:03 +0900
parents 2afbb6404840
children 1d4f2b72fb31
line wrap: on
line diff
--- a/src/alice/datasegment/DataSegmentManager.java	Fri Feb 10 03:33:29 2012 +0900
+++ b/src/alice/datasegment/DataSegmentManager.java	Sat Feb 11 16:40:03 2012 +0900
@@ -14,6 +14,8 @@
 	protected ConcurrentHashMap<Integer, Command> seqHash = new ConcurrentHashMap<Integer, Command>();
 	public LinkedBlockingQueue<Command> replyQueue = new LinkedBlockingQueue<Command>();
 	protected AtomicInteger seq = new AtomicInteger(1);
+	boolean debug = false;
+	
 	protected Runnable replyThread = new Runnable() {
 		Logger logger = Logger.getLogger("reply");
 		@Override
@@ -28,7 +30,8 @@
 					}
 					seqHash.remove(reply.seq);
 					cmd.cs.ids.reply(cmd.receiver, new DataSegmentValue(reply.index, reply.val, reply.reverseKey));
-					//logger.debug(reply.getCommandString() + " " + cmd.getCommandString());
+					if (debug)
+						logger.debug(reply.getCommandString() + " " + cmd.getCommandString());
 				} catch (InterruptedException e) {
 					e.printStackTrace();
 				}