changeset 53:f9c82d9a4936

move msgpack local val to static field;
author kazz <kazz@cr.ie.u-ryukyu.ac.jp>
date Sun, 05 Feb 2012 14:31:43 +0900
parents 0f773308a863
children 27a64e771c4c
files src/alice/daemon/IncomingTcpConnection.java
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/alice/daemon/IncomingTcpConnection.java	Sun Feb 05 06:42:23 2012 +0900
+++ b/src/alice/daemon/IncomingTcpConnection.java	Sun Feb 05 14:31:43 2012 +0900
@@ -16,6 +16,7 @@
 
 public class IncomingTcpConnection extends Thread {
 	
+	private static MessagePack MSGPACK = new MessagePack();
 	public Connection connection;
 	public DataSegmentManager manager;
 	public String reverseKey;
@@ -26,10 +27,9 @@
 	}
 	
 	public void run() {
-		MessagePack msgpack = new MessagePack();
 		Unpacker unpacker = null;
 		try {
-			unpacker = msgpack.createUnpacker(connection.socket.getInputStream());
+			unpacker = MSGPACK.createUnpacker(connection.socket.getInputStream());
 		} catch (IOException e2) {
 			e2.printStackTrace();
 		}