diff src/alice/datasegment/DataSegmentManager.java @ 3:91057e15065f

add DataSegment API and CodeSegment
author one
date Wed, 11 Jan 2012 00:17:27 +0900
parents f71eabb1df2a
children 80375ae09a1f
line wrap: on
line diff
--- a/src/alice/datasegment/DataSegmentManager.java	Sun Dec 11 06:37:05 2011 +0900
+++ b/src/alice/datasegment/DataSegmentManager.java	Wed Jan 11 00:17:27 2012 +0900
@@ -1,22 +1,22 @@
 package alice.datasegment;
 
 import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.Future;
+import org.msgpack.type.Value;
 
-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 Future<Value> take(String key) {
-		return take(key, 0);
+	public void take(String key, CodeSegment cs) {
+		take(key, 0, cs);
 	}
-	public abstract Future<Value> take(String key, int index);
-	public Future<Value> peek(String key) {
-		return peek(key, 0);
+	public abstract void take(String key, int index, CodeSegment cs);
+	public void peek(String key, CodeSegment cs) {
+		peek(key, 0, cs);
 	}
-	public abstract Future<Value> peek(String key, int index);
-	public abstract void delete(String key);
+	public abstract void peek(String key, int index, CodeSegment cs);
+	public abstract void remove(String key);
 	
 }