view src/alice/datasegment/DataSegmentManager.java @ 8:78b415d019de

Local DS and CS work! maybe...
author one
date Thu, 12 Jan 2012 16:02:28 +0900
parents 352eb19d837d
children c4d6ff56b9bf
line wrap: on
line source

package alice.datasegment;

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

import org.msgpack.type.Value;

import alice.codesegment.CodeSegment;

public abstract class DataSegmentManager {
	public ConcurrentHashMap<String, DataSegmentKey> dataSegments = new ConcurrentHashMap<String, DataSegmentKey>();
	public ConcurrentHashMap<Integer, Command> seqHash = new ConcurrentHashMap<Integer, Command>();
	public LinkedBlockingQueue<Reply> replyQueue = new LinkedBlockingQueue<Reply>();  
	
	public abstract void put(String key, Value val);
	public abstract void update(String key, Value val);
	public void take(String argKey, String key, CodeSegment cs) {
		take(argKey, key, 0, cs);
	}
	public abstract void take(String argKey, String key, int index, CodeSegment cs);
	public void peek(String argKey, String key, CodeSegment cs) {
		peek(argKey, key, 0, cs);
	}
	public abstract void peek(String argKey, String key, int index, CodeSegment cs);
	public abstract void remove(String key);
	
}