diff src/main/java/alice/test/topology/share/LookUpData.java @ 345:8f71c3e6f11d

Change directory structure Maven standard
author sugi
date Wed, 16 Apr 2014 18:26:07 +0900
parents
children aefbe41fcf12
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/main/java/alice/test/topology/share/LookUpData.java	Wed Apr 16 18:26:07 2014 +0900
@@ -0,0 +1,32 @@
+package alice.test.topology.share;
+
+import alice.codesegment.CodeSegment;
+import alice.datasegment.CommandType;
+import alice.datasegment.Receiver;
+
+public class LookUpData extends CodeSegment{
+
+	private Receiver data = ids.create(CommandType.PEEK);
+	String key;
+	int depth;
+	
+	public LookUpData(String key,int index){
+		this.key = key;
+		this.data.setKey(key, index);
+	}
+	
+	public LookUpData(String key,int index, int depth){
+		this.key = key;
+		this.depth = depth;
+		this.data.setKey(key, index);
+	}
+
+	@Override
+	public void run(){
+		new LookUpData(this.key,this.data.index);
+		DataInfo di = data.asClass(DataInfo.class);
+		System.out.println(System.nanoTime()-di.getTime());
+
+	}
+	
+}
\ No newline at end of file