Mercurial > hg > Members > tatsuki > Alice
comparison src/alice/daemon/IncomingTcpConnection.java @ 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 | 919389066887 |
children | ebdcab7b9b04 |
comparison
equal
deleted
inserted
replaced
52:0f773308a863 | 53:f9c82d9a4936 |
---|---|
14 import alice.datasegment.DataSegmentManager; | 14 import alice.datasegment.DataSegmentManager; |
15 import alice.datasegment.LocalDataSegmentManager; | 15 import alice.datasegment.LocalDataSegmentManager; |
16 | 16 |
17 public class IncomingTcpConnection extends Thread { | 17 public class IncomingTcpConnection extends Thread { |
18 | 18 |
19 private static MessagePack MSGPACK = new MessagePack(); | |
19 public Connection connection; | 20 public Connection connection; |
20 public DataSegmentManager manager; | 21 public DataSegmentManager manager; |
21 public String reverseKey; | 22 public String reverseKey; |
22 public IncomingTcpConnection(Connection connection, DataSegmentManager manager, String reverseKey) { | 23 public IncomingTcpConnection(Connection connection, DataSegmentManager manager, String reverseKey) { |
23 this.manager = manager; | 24 this.manager = manager; |
24 this.connection = connection; | 25 this.connection = connection; |
25 this.reverseKey = reverseKey; | 26 this.reverseKey = reverseKey; |
26 } | 27 } |
27 | 28 |
28 public void run() { | 29 public void run() { |
29 MessagePack msgpack = new MessagePack(); | |
30 Unpacker unpacker = null; | 30 Unpacker unpacker = null; |
31 try { | 31 try { |
32 unpacker = msgpack.createUnpacker(connection.socket.getInputStream()); | 32 unpacker = MSGPACK.createUnpacker(connection.socket.getInputStream()); |
33 } catch (IOException e2) { | 33 } catch (IOException e2) { |
34 e2.printStackTrace(); | 34 e2.printStackTrace(); |
35 } | 35 } |
36 while (true) { | 36 while (true) { |
37 try { | 37 try { |