comparison rep/handler/REPNode.java @ 386:bba62c4ac323

sync-option
author one@firefly.cr.ie.u-ryukyu.ac.jp
date Mon, 10 Nov 2008 22:19:34 +0900
parents bcdf5476b8e4
children 6f356d160e58
comparison
equal deleted inserted replaced
385:1fca50ce3508 386:bba62c4ac323
2 2
3 import java.io.IOException; 3 import java.io.IOException;
4 4
5 import rep.REP; 5 import rep.REP;
6 import rep.REPCommand; 6 import rep.REPCommand;
7 import rep.Session;
7 import rep.channel.REPSelectionKey; 8 import rep.channel.REPSelectionKey;
8 import rep.channel.REPSocketChannel; 9 import rep.channel.REPSocketChannel;
9 10
10 /** 11 /**
11 * @author kono 12 * @author kono
101 public abstract String getLocalHostName(); 102 public abstract String getLocalHostName();
102 103
103 104
104 public abstract void send(REPCommand command) ; 105 public abstract void send(REPCommand command) ;
105 106
107 public abstract void sendWithSeq(REPCommand command) ;
106 108
107 public abstract void setQuit2(REPCommand receivedCommand) ; 109 public abstract void setQuit2(REPCommand receivedCommand) ;
108 110
109 public abstract int seq() ; 111 public abstract int seq() ;
110 112
111 public abstract boolean isMerging() ; 113 public abstract boolean isMerging() ;
112 114
113 115
114 public abstract boolean manage(REPCommand command) ; 116 public abstract boolean manage(REPCommand command) ;
115 117
118
119 public abstract void selectSession(REPCommand sendCommand,Session session) ;
116 120
117 public void setMode(REP cmd) { 121 public void setMode(REP cmd) {
118 mode = cmd; 122 mode = cmd;
119 } 123 }
120 124
134 return next; 138 return next;
135 } 139 }
136 public void setNext(REPNode f) { 140 public void setNext(REPNode f) {
137 next = f; 141 next = f;
138 } 142 }
143
144
145 public void sendSync(REPCommand sync) {
146 next.sendWithSeq(sync);
147 }
139 148
140
141 } 149 }