Review Board 1.7.22

Delayed RPC: add ability to set return value immediately at call return

Review Request #1257 - Created Aug. 2, 2011 and updated

Vlad Dogaru
Some use cases of delayed RPCs need the ability to delay the call until a further moment, but set the return value immediately.  For example, if a handler calls a function returning void that might delay (a sync), the result does not depend on the function's result (since it has none).  This patch enables that by making the following changes:

* change the Delayable interface so that startDelay specifies whether the return value should be set immediately after call return or at the end of the delay;
* make HBaseServer work according to the new semantics;
* add a unit test.  We now have testDelayedRpc{Immediate,Delayed}Response, testing that immediate and delayed return values work.

Please review, thanks!
Since the code is not used yet, it does not affect other areas of the codebase.  Running unit tests as we speak.
Review request changed
Updated (Aug. 5, 2011, 5:59 p.m.)
Add endDelay() to the interface, for use when the return value was not delayed.  Thanks for the suggestion.
Ship it!
Posted (Aug. 5, 2011, 6:34 p.m.)
+1 from me

Todd you going to commit?