annotate src/alice/datasegment/Command.java @ 190:a85ff8dc16c1 working

add Object data
author one
date Thu, 07 Mar 2013 21:27:00 +0900
parents 20616fe4d28a
children 60051454e443
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
1 package alice.datasegment;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
2
13
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
3 import java.util.concurrent.BlockingQueue;
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
4
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
5 import org.msgpack.type.Value;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
6
7
352eb19d837d implements reply of LocalDataSegment
one
parents: 6
diff changeset
7 import alice.codesegment.CodeSegment;
352eb19d837d implements reply of LocalDataSegment
one
parents: 6
diff changeset
8
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
9 public class Command {
13
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
10 public CommandType type;
14
e3f1b21718b0 implements RemoteDataSegment
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 13
diff changeset
11 public String key;
33
20c67f673224 change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
12 public Receiver receiver;
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
13 public Value val;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
14 public int index;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
15 public int seq;
13
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
16 public BlockingQueue<Command> replyQueue;
7
352eb19d837d implements reply of LocalDataSegment
one
parents: 6
diff changeset
17 public CodeSegment cs;
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
18 public String reverseKey;
190
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
19 public Object obj;
7
352eb19d837d implements reply of LocalDataSegment
one
parents: 6
diff changeset
20
33
20c67f673224 change name of DataSegmentReceiver
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 28
diff changeset
21 public Command(CommandType cmdType, Receiver receiver, String key, Value val, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) {
13
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
22 this.type = cmdType;
18
72dd27d952b0 change InputDataSegment API
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 16
diff changeset
23 this.receiver = receiver;
16
433e601a8e28 network bug fix
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 14
diff changeset
24 this.key = key;
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
25 this.val = val;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
26 this.index = index;
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
27 this.seq = seq;
13
30f97d776a3e implements Alice daemon
one
parents: 7
diff changeset
28 this.replyQueue = replyQueue;
7
352eb19d837d implements reply of LocalDataSegment
one
parents: 6
diff changeset
29 this.cs = cs;
28
98ab26e09a98 Configuration Manager work and implements reverseKey
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 18
diff changeset
30 this.reverseKey = reverseKey;
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
31 }
190
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
32 public Command(CommandType cmdType, Receiver receiver, String key, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) {
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
33 this.type = cmdType;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
34 this.receiver = receiver;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
35 this.key = key;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
36 this.obj = obj;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
37 this.index = index;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
38 this.seq = seq;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
39 this.replyQueue = replyQueue;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
40 this.cs = cs;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
41 this.reverseKey = reverseKey;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
42 }
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
43
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
44 public Command(CommandType cmdType, Receiver receiver, String key, Value val, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) {
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
45 this.type = cmdType;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
46 this.receiver = receiver;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
47 this.key = key;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
48 this.val = val;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
49 this.index = index;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
50 this.seq = seq;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
51 this.replyQueue = replyQueue;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
52 this.cs = cs;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
53 this.reverseKey = reverseKey;
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
54 }
a85ff8dc16c1 add Object data
one
parents: 40
diff changeset
55
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
56
39
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
57 public String getCommandString() {
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
58 String csName = "null";
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
59 if (cs != null) {
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
60 csName = cs.toString();
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
61 }
40
20616fe4d28a add log viewer
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 39
diff changeset
62 return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName;
39
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
63 }
3155337e754e add logger
kazz <kazz@cr.ie.u-ryukyu.ac.jp>
parents: 33
diff changeset
64
3
91057e15065f add DataSegment API and CodeSegment
one
parents:
diff changeset
65 }