view src/alice/datasegment/DataSegmentManager.java @ 5:80375ae09a1f

add update api
author one
date Wed, 11 Jan 2012 23:28:02 +0900
parents 91057e15065f
children c78a1cc2cd8f
line wrap: on
line source

package alice.datasegment;

import java.util.concurrent.ConcurrentHashMap;
import org.msgpack.type.Value;

import alice.codesegment.CodeSegment;

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