Mercurial > hg > Members > tatsuki > Alice
comparison 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 |
comparison
equal
deleted
inserted
replaced
201:7c3c59513fee | 202:7f47231ef509 |
---|---|
14 public int seq; | 14 public int seq; |
15 public BlockingQueue<Command> replyQueue; | 15 public BlockingQueue<Command> replyQueue; |
16 public CodeSegment cs; | 16 public CodeSegment cs; |
17 public String reverseKey; | 17 public String reverseKey; |
18 public Object obj; | 18 public Object obj; |
19 public DataSegmentValue dsv; | 19 |
20 | |
21 public Command(CommandType cmdType, int seq, DataSegmentValue dsv){ | |
22 this.type=cmdType; | |
23 this.seq=seq; | |
24 this.dsv=dsv; | |
25 } | |
26 | |
27 public Command(CommandType cmdType, Receiver receiver, String key, Value val, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { | 20 public Command(CommandType cmdType, Receiver receiver, String key, Value val, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { |
28 this.type = cmdType; | 21 this.type = cmdType; |
29 this.receiver = receiver; | 22 this.receiver = receiver; |
30 this.key = key; | 23 this.key = key; |
31 this.val = val; | 24 this.val = val; |
58 this.replyQueue = replyQueue; | 51 this.replyQueue = replyQueue; |
59 this.cs = cs; | 52 this.cs = cs; |
60 this.reverseKey = reverseKey; | 53 this.reverseKey = reverseKey; |
61 } | 54 } |
62 | 55 |
63 | |
64 | |
65 | |
66 public String getCommandString() { | 56 public String getCommandString() { |
67 String csName = "null"; | 57 String csName = "null"; |
68 if (cs != null) { | 58 if (cs != null) { |
69 csName = cs.toString(); | 59 csName = cs.toString(); |
70 } | 60 } |
71 return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName; | 61 return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName; |
72 } | 62 } |
73 | 63 |
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 | |
74 } | 75 } |