Mercurial > hg > RemoteEditor > Eclipse
changeset 13:d8a7523ee386
*** empty log message ***
author | fuchita |
---|---|
date | Mon, 23 Oct 2006 01:23:49 +0900 |
parents | 4e88130303cc |
children | 0ac009f1c69e |
files | src/sample/merge/Merge.java src/sample/merge/Rep_Cmd.java |
diffstat | 2 files changed, 55 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/src/sample/merge/Merge.java Mon Oct 23 01:08:43 2006 +0900 +++ b/src/sample/merge/Merge.java Mon Oct 23 01:23:49 2006 +0900 @@ -1,30 +1,52 @@ package sample.merge; +import java.util.LinkedList; + + public class Merge { + static final int REP_INSERT_CMD = 6; + static final int REP_INSERT_ACK_CMD = 7; + static final int REP_JOIN_CMD = 41; + static final int REP_JOIN_ACK_CMD = 42; + static final int REP_PUT_CMD = 45; + static final int REP_PUT_ACK_CMD = 46; + static final int REP_SELECT_CMD = 47; + static final int REP_SELECT_ACK_CMD = 48; + static final int REP_QUIT_CMD = 53; + static final int REP_QUIT_ACK_CMD = 54; + + private LinkedList inUserList; + private LinkedList inTokenList; - private byte[] inUserList; - private byte[] inTokenList; - - private byte[] outUserList; - private byte[] outTokenList; + private LinkedList outUserList; + private LinkedList outTokenList; protected Merge() { } - public Merge(byte[] inUserList, byte[] inTokenList) { + public Merge(LinkedList inUserList, LinkedList inTokenList) { this.inUserList = inUserList; this.inTokenList = inTokenList; } - + public byte[] mergeRepCommand() { return null; } - public int add(int i, int j) { + public int addList(int i, int j) { + return i+j; } - public static void main(String[] args) { + public static void main(String[] args) throws Exception { Merge merge = new Merge(); + LinkedList inList = new LinkedList(); + inList.add(new Rep_Cmd(47,1,0,0,0,0,"test")); + inList.add(new Rep_Cmd(41,1,0,0,0,0,"tesu")); + inList.add(new Rep_Cmd(41,1,0,0,0,0,"tesu")); + inList.add(new Rep_Cmd(41,1,0,0,0,0,"tesu")); + inUserList.add(new Rep_Cmd(41,1,0,0,0,0,"tesu")); + + } }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/src/sample/merge/Rep_Cmd.java Mon Oct 23 01:23:49 2006 +0900 @@ -0,0 +1,24 @@ +package sample.merge; + +public class Rep_Cmd { + public int cmd; + public int sid; + public int eid; + public int seq; + public int len; + public int lineno; + public int stat; + + public String string; + + public Rep_Cmd(int cmd,int sid,int eid, int seq, int len, int lineno, String string) throws Exception { + this.cmd = cmd; + this.sid = sid; + this.eid = eid; + this.seq = seq; + this.len = len; + this.lineno = lineno; + this.string = string; + } + +}