@Override public AllowSnapshotResponseProto allowSnapshot(RpcController controller, AllowSnapshotRequestProto req) throws ServiceException { try { server.allowSnapshot(req.getSnapshotRoot()); return VOID_ALLOW_SNAPSHOT_RESPONSE; } catch (IOException e) { throw new ServiceException(e); } }
@Override public void allowSnapshot(String snapshotRoot) throws IOException { AllowSnapshotRequestProto req = AllowSnapshotRequestProto.newBuilder() .setSnapshotRoot(snapshotRoot).build(); try { rpcProxy.allowSnapshot(null, req); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }