@Override public RecoverLeaseResponseProto recoverLease(RpcController controller, RecoverLeaseRequestProto req) throws ServiceException { try { boolean result = server.recoverLease(req.getSrc(), req.getClientName()); return RecoverLeaseResponseProto.newBuilder().setResult(result).build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public boolean recoverLease(String src, String clientName) throws IOException { RecoverLeaseRequestProto req = RecoverLeaseRequestProto.newBuilder() .setSrc(src) .setClientName(clientName).build(); try { return rpcProxy.recoverLease(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public boolean recoverLease(String src, String clientName) throws IOException { RecoverLeaseRequestProto req = RecoverLeaseRequestProto.newBuilder().setSrc(src) .setClientName(clientName).build(); try { return rpcProxy.recoverLease(null, req).getResult(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }