Mercurial > hg > Database > Alice
comparison 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 |
comparison
equal
deleted
inserted
replaced
344:9f97ec18f8c5 | 345:8f71c3e6f11d |
---|---|
1 package alice.test.topology.share; | |
2 | |
3 import alice.codesegment.CodeSegment; | |
4 import alice.datasegment.CommandType; | |
5 import alice.datasegment.Receiver; | |
6 | |
7 public class LookUpData extends CodeSegment{ | |
8 | |
9 private Receiver data = ids.create(CommandType.PEEK); | |
10 String key; | |
11 int depth; | |
12 | |
13 public LookUpData(String key,int index){ | |
14 this.key = key; | |
15 this.data.setKey(key, index); | |
16 } | |
17 | |
18 public LookUpData(String key,int index, int depth){ | |
19 this.key = key; | |
20 this.depth = depth; | |
21 this.data.setKey(key, index); | |
22 } | |
23 | |
24 @Override | |
25 public void run(){ | |
26 new LookUpData(this.key,this.data.index); | |
27 DataInfo di = data.asClass(DataInfo.class); | |
28 System.out.println(System.nanoTime()-di.getTime()); | |
29 | |
30 } | |
31 | |
32 } |