Closed EasonLiao closed 10 years ago
Since all requests issued to Jzab is asynchronous, we need a way to match the completed requests in callback with the one we issued.
Associating a context object with each requests seems to be a good way to solve this, like what ZooKeeper does.
void send(ByteBuffer req, Object ctx); void flush(ByteBuffer req, Object ctx); void remove(String serverId, Object ctx);
Probably we don't need clientId in deliver callback anymore?
@m1ch1
some code refactoring on CommitProcessor
Since all requests issued to Jzab is asynchronous, we need a way to match the completed requests in callback with the one we issued.
Associating a context object with each requests seems to be a good way to solve this, like what ZooKeeper does.