Mercurial > hg > Members > tatsuki > Alice
comparison src/alice/codesegment/CodeSegmentManager.java @ 6:c78a1cc2cd8f
implements Reply
author | one |
---|---|
date | Thu, 12 Jan 2012 13:19:04 +0900 |
parents | |
children | 352eb19d837d |
comparison
equal
deleted
inserted
replaced
5:80375ae09a1f | 6:c78a1cc2cd8f |
---|---|
1 package alice.codesegment; | |
2 | |
3 import java.util.concurrent.ConcurrentHashMap; | |
4 import java.util.concurrent.LinkedBlockingQueue; | |
5 | |
6 public class CodeSegmentManager { | |
7 private static CodeSegmentManager instance = new CodeSegmentManager(); | |
8 private LinkedBlockingQueue<Reply> replyQueue = new LinkedBlockingQueue<Reply>(); | |
9 private ConcurrentHashMap<Integer, CodeSegment> seqHash = new ConcurrentHashMap<Integer, CodeSegment>(); | |
10 | |
11 private CodeSegmentManager() { | |
12 Runnable replyThread = new Runnable() { | |
13 | |
14 @Override | |
15 public void run() { | |
16 while (true) { | |
17 try { | |
18 Reply reply = replyQueue.take(); | |
19 | |
20 } catch (InterruptedException e) { | |
21 e.printStackTrace(); | |
22 } | |
23 } | |
24 | |
25 } | |
26 }; | |
27 } | |
28 | |
29 public void create(CodeSegment cs) { | |
30 } | |
31 | |
32 public static CodeSegmentManager get() { | |
33 return instance; | |
34 } | |
35 } |