Mercurial > hg > Members > tatsuki > Alice
diff 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 |
line wrap: on
line diff
--- a/src/alice/datasegment/Command.java Sat Mar 23 17:07:59 2013 +0900 +++ b/src/alice/datasegment/Command.java Mon Mar 25 17:46:07 2013 +0900 @@ -16,14 +16,7 @@ public CodeSegment cs; public String reverseKey; public Object obj; - public DataSegmentValue dsv; - - public Command(CommandType cmdType, int seq, DataSegmentValue dsv){ - this.type=cmdType; - this.seq=seq; - this.dsv=dsv; - } - + public Command(CommandType cmdType, Receiver receiver, String key, Value val, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { this.type = cmdType; this.receiver = receiver; @@ -60,9 +53,6 @@ this.reverseKey = reverseKey; } - - - public String getCommandString() { String csName = "null"; if (cs != null) { @@ -71,4 +61,15 @@ return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName; } + public void setElement(CommandType cmdType, String key, Value val, Object obj){ + this.type = cmdType; + this.receiver = null; + this.key = key; + this.val = val; + this.obj = obj; + this.replyQueue = null; + this.cs = null; + this.reverseKey = "local"; + } + }