Mercurial > hg > Members > tatsuki > Alice
annotate src/alice/datasegment/Command.java @ 202:7f47231ef509 working
add new flip API
author | sugi |
---|---|
date | Mon, 25 Mar 2013 17:46:07 +0900 |
parents | f151dea22b2c |
children | 28469b1671e7 |
rev | line source |
---|---|
3 | 1 package alice.datasegment; |
2 | |
13 | 3 import java.util.concurrent.BlockingQueue; |
3 | 4 import org.msgpack.type.Value; |
5 | |
7 | 6 import alice.codesegment.CodeSegment; |
7 | |
3 | 8 public class Command { |
13 | 9 public CommandType type; |
14
e3f1b21718b0
implements RemoteDataSegment
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
13
diff
changeset
|
10 public String key; |
33
20c67f673224
change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
11 public Receiver receiver; |
3 | 12 public Value val; |
13 public int index; | |
14 public int seq; | |
13 | 15 public BlockingQueue<Command> replyQueue; |
7 | 16 public CodeSegment cs; |
28
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
17 public String reverseKey; |
190 | 18 public Object obj; |
202 | 19 |
33
20c67f673224
change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
28
diff
changeset
|
20 public Command(CommandType cmdType, Receiver receiver, String key, Value val, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { |
13 | 21 this.type = cmdType; |
18
72dd27d952b0
change InputDataSegment API
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
16
diff
changeset
|
22 this.receiver = receiver; |
16 | 23 this.key = key; |
3 | 24 this.val = val; |
25 this.index = index; | |
26 this.seq = seq; | |
13 | 27 this.replyQueue = replyQueue; |
7 | 28 this.cs = cs; |
28
98ab26e09a98
Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents:
18
diff
changeset
|
29 this.reverseKey = reverseKey; |
3 | 30 } |
190 | 31 public Command(CommandType cmdType, Receiver receiver, String key, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { |
32 this.type = cmdType; | |
33 this.receiver = receiver; | |
34 this.key = key; | |
35 this.obj = obj; | |
36 this.index = index; | |
37 this.seq = seq; | |
38 this.replyQueue = replyQueue; | |
39 this.cs = cs; | |
40 this.reverseKey = reverseKey; | |
41 } | |
42 | |
43 public Command(CommandType cmdType, Receiver receiver, String key, Value val, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { | |
44 this.type = cmdType; | |
45 this.receiver = receiver; | |
46 this.key = key; | |
47 this.val = val; | |
191 | 48 this.obj = obj; |
190 | 49 this.index = index; |
50 this.seq = seq; | |
51 this.replyQueue = replyQueue; | |
52 this.cs = cs; | |
53 this.reverseKey = reverseKey; | |
54 } | |
55 | |
39 | 56 public String getCommandString() { |
57 String csName = "null"; | |
58 if (cs != null) { | |
59 csName = cs.toString(); | |
60 } | |
40 | 61 return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName; |
39 | 62 } |
63 | |
202 | 64 public void setElement(CommandType cmdType, String key, Value val, Object obj){ |
65 this.type = cmdType; | |
66 this.receiver = null; | |
67 this.key = key; | |
68 this.val = val; | |
69 this.obj = obj; | |
70 this.replyQueue = null; | |
71 this.cs = null; | |
72 this.reverseKey = "local"; | |
73 } | |
74 | |
3 | 75 } |