org.apache.hadoop.hbase.ipc
Interface Delayable

All Known Subinterfaces:
RpcCallContext
All Known Implementing Classes:
HBaseServer.Call

public interface Delayable

A call whose response can be delayed by the server.


Method Summary
 void endDelay()
          Signal the end of a delayed RPC, without specifying the return value.
 void endDelay(Object result)
          Signal that the RPC server is now allowed to send the response.
 void endDelayThrowing(Throwable t)
          End the call, throwing and exception to the caller.
 boolean isDelayed()
           
 boolean isReturnValueDelayed()
           
 void startDelay(boolean delayReturnValue)
          Signal that the call response should be delayed, thus freeing the RPC server to handle different requests.
 

Method Detail

startDelay

void startDelay(boolean delayReturnValue)
Signal that the call response should be delayed, thus freeing the RPC server to handle different requests.

Parameters:
delayReturnValue - Controls whether the return value of the call should be set when ending the delay or right away. There are cases when the return value can be set right away, even if the call is delayed.

isDelayed

boolean isDelayed()
Returns:
is the call delayed?

isReturnValueDelayed

boolean isReturnValueDelayed()
Returns:
is the return value delayed?

endDelay

void endDelay(Object result)
              throws IOException
Signal that the RPC server is now allowed to send the response.

Parameters:
result - The value to return to the caller. If the corresponding delay response specified that the return value should not be delayed, this parameter must be null.
Throws:
IOException

endDelay

void endDelay()
              throws IOException
Signal the end of a delayed RPC, without specifying the return value. Use this only if the return value was not delayed

Throws:
IOException

endDelayThrowing

void endDelayThrowing(Throwable t)
                      throws IOException
End the call, throwing and exception to the caller. This works regardless of the return value being delayed.

Parameters:
t - Object to throw to the client.
Throws:
IOException


Copyright © 2013 The Apache Software Foundation. All Rights Reserved.