@Override public GetBlockKeysResponseProto getBlockKeys(RpcController unused, GetBlockKeysRequestProto request) throws ServiceException { ExportedBlockKeys keys; try { keys = impl.getBlockKeys(); } catch (IOException e) { throw new ServiceException(e); } GetBlockKeysResponseProto.Builder builder = GetBlockKeysResponseProto.newBuilder(); if (keys != null) { builder.setKeys(PBHelper.convert(keys)); } return builder.build(); }
@Override public ExportedBlockKeys getBlockKeys() throws IOException { try { GetBlockKeysResponseProto rsp = rpcProxy.getBlockKeys(NULL_CONTROLLER, VOID_GET_BLOCKKEYS_REQUEST); return rsp.hasKeys() ? PBHelper.convert(rsp.getKeys()) : null; } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }