@Override public GetPreferredBlockSizeResponseProto getPreferredBlockSize( RpcController controller, GetPreferredBlockSizeRequestProto req) throws ServiceException { try { long result = server.getPreferredBlockSize(req.getFilename()); return GetPreferredBlockSizeResponseProto.newBuilder().setBsize(result) .build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public long getPreferredBlockSize(String filename) throws IOException, UnresolvedLinkException { GetPreferredBlockSizeRequestProto req = GetPreferredBlockSizeRequestProto .newBuilder() .setFilename(filename) .build(); try { return rpcProxy.getPreferredBlockSize(null, req).getBsize(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public long getPreferredBlockSize(String filename) throws IOException { GetPreferredBlockSizeRequestProto req = GetPreferredBlockSizeRequestProto .newBuilder() .setFilename(filename) .build(); try { return rpcProxy.getPreferredBlockSize(null, req).getBsize(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public long getPreferredBlockSize(String filename) throws IOException, UnresolvedLinkException { GetPreferredBlockSizeRequestProto req = GetPreferredBlockSizeRequestProto.newBuilder().setFilename(filename) .build(); try { return rpcProxy.getPreferredBlockSize(null, req).getBsize(); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }