view src/alice/codesegment/CodeSegmentManager.java @ 6:c78a1cc2cd8f

implements Reply
author one
date Thu, 12 Jan 2012 13:19:04 +0900
parents
children 352eb19d837d
line wrap: on
line source

package alice.codesegment;

import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.LinkedBlockingQueue;

public class CodeSegmentManager {
	private static CodeSegmentManager instance = new CodeSegmentManager();
	private LinkedBlockingQueue<Reply> replyQueue = new LinkedBlockingQueue<Reply>();
	private ConcurrentHashMap<Integer, CodeSegment> seqHash = new ConcurrentHashMap<Integer, CodeSegment>();
	
	private CodeSegmentManager() {
		Runnable replyThread = new Runnable() {

			@Override
			public void run() {
				while (true) {
					try {
						Reply reply = replyQueue.take();
						
					} catch (InterruptedException e) {
						e.printStackTrace();
					}
				}
				
			}
		};
	}
	
	public void create(CodeSegment cs) {
	}
	
	public static CodeSegmentManager get() {
		return instance;
	}
}