Mercurial > hg > Members > tatsuki > Alice
view 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 |
line wrap: on
line source
package alice.datasegment; import java.util.concurrent.BlockingQueue; import org.msgpack.type.Value; import alice.codesegment.CodeSegment; public class Command { public CommandType type; public String key; public Receiver receiver; public Value val; public int index; public int seq; public BlockingQueue<Command> replyQueue; public CodeSegment cs; public String reverseKey; public Object obj; 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; this.key = key; this.val = val; this.index = index; this.seq = seq; this.replyQueue = replyQueue; this.cs = cs; this.reverseKey = reverseKey; } public Command(CommandType cmdType, Receiver receiver, String key, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { this.type = cmdType; this.receiver = receiver; this.key = key; this.obj = obj; this.index = index; this.seq = seq; this.replyQueue = replyQueue; this.cs = cs; this.reverseKey = reverseKey; } public Command(CommandType cmdType, Receiver receiver, String key, Value val, Object obj, int index, int seq, BlockingQueue<Command> replyQueue, CodeSegment cs, String reverseKey) { this.type = cmdType; this.receiver = receiver; this.key = key; this.val = val; this.index = index; this.seq = seq; this.replyQueue = replyQueue; this.cs = cs; this.reverseKey = reverseKey; } public String getCommandString() { String csName = "null"; if (cs != null) { csName = cs.toString(); } return this.type + "\t" + key + "\t" + val + "\tindex=" + index + "\tcs=" + csName; } }