Java 类org.apache.hadoop.hbase.ipc.protobuf.generated.TestDelayedRpcProtos.TestResponse 实例源码

项目:pbase    文件:TestDelayedRpc.java   
@Override
public TestResponse test(RpcController rpcController, TestArg arg)
throws ServiceException {
  LOG.info("In faulty test, delay=" + arg.getDelay());
  if (!arg.getDelay()) return TestResponse.newBuilder().setResponse(UNDELAYED).build();
  Delayable call = RpcServer.getCurrentCall();
  call.startDelay(true);
  LOG.info("In faulty test, delaying");
  try {
    call.endDelayThrowing(new Exception("Something went wrong"));
  } catch (IOException e) {
    e.printStackTrace();
  }
  // Client will receive the Exception, not this value.
  return TestResponse.newBuilder().setResponse(DELAYED).build();
}
项目:HIndex    文件:TestDelayedRpc.java   
@Override
public TestResponse test(RpcController rpcController, TestArg arg)
throws ServiceException {
  LOG.info("In faulty test, delay=" + arg.getDelay());
  if (!arg.getDelay()) return TestResponse.newBuilder().setResponse(UNDELAYED).build();
  Delayable call = RpcServer.getCurrentCall();
  call.startDelay(true);
  LOG.info("In faulty test, delaying");
  try {
    call.endDelayThrowing(new Exception("Something went wrong"));
  } catch (IOException e) {
    e.printStackTrace();
  }
  // Client will receive the Exception, not this value.
  return TestResponse.newBuilder().setResponse(DELAYED).build();
}
项目:PyroDB    文件:TestDelayedRpc.java   
@Override
public TestResponse test(RpcController rpcController, TestArg arg)
throws ServiceException {
  LOG.info("In faulty test, delay=" + arg.getDelay());
  if (!arg.getDelay()) return TestResponse.newBuilder().setResponse(UNDELAYED).build();
  Delayable call = RpcServer.getCurrentCall();
  call.startDelay(true);
  LOG.info("In faulty test, delaying");
  try {
    call.endDelayThrowing(new Exception("Something went wrong"));
  } catch (IOException e) {
    e.printStackTrace();
  }
  // Client will receive the Exception, not this value.
  return TestResponse.newBuilder().setResponse(DELAYED).build();
}
项目:c5    文件:TestDelayedRpc.java   
@Override
public TestResponse test(RpcController rpcController, TestArg arg)
throws ServiceException {
  LOG.info("In faulty test, delay=" + arg.getDelay());
  if (!arg.getDelay()) return TestResponse.newBuilder().setResponse(UNDELAYED).build();
  Delayable call = RpcServer.getCurrentCall();
  call.startDelay(true);
  LOG.info("In faulty test, delaying");
  try {
    call.endDelayThrowing(new Exception("Something went wrong"));
  } catch (IOException e) {
    e.printStackTrace();
  }
  // Client will receive the Exception, not this value.
  return TestResponse.newBuilder().setResponse(DELAYED).build();
}
项目:DominoHBase    文件:TestDelayedRpc.java   
@Override
public TestResponse test(TestArg arg) {
  if (!arg.getDelay())
    return TestResponse.newBuilder().setResponse(UNDELAYED).build();
  Delayable call = HBaseServer.getCurrentCall();
  call.startDelay(true);
  try {
    call.endDelayThrowing(new Exception("Something went wrong"));
  } catch (IOException e) {
    e.printStackTrace();
  }
  // Client will receive the Exception, not this value.
  return TestResponse.newBuilder().setResponse(DELAYED).build();
}
项目:DominoHBase    文件:TestDelayedRpc.java   
TestResponse test(TestArg delay);