@Override public ModifyCacheDirectiveResponseProto modifyCacheDirective( RpcController controller, ModifyCacheDirectiveRequestProto request) throws ServiceException { try { server.modifyCacheDirective( PBHelper.convert(request.getInfo()), PBHelper.convertCacheFlags(request.getCacheFlags())); return ModifyCacheDirectiveResponseProto.newBuilder().build(); } catch (IOException e) { throw new ServiceException(e); } }
@Override public void modifyCacheDirective(CacheDirectiveInfo directive, EnumSet<CacheFlag> flags) throws IOException { try { ModifyCacheDirectiveRequestProto.Builder builder = ModifyCacheDirectiveRequestProto.newBuilder(). setInfo(PBHelper.convert(directive)); if (!flags.isEmpty()) { builder.setCacheFlags(PBHelper.convertCacheFlags(flags)); } rpcProxy.modifyCacheDirective(null, builder.build()); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public void modifyCacheDirective(CacheDirectiveInfo directive, EnumSet<CacheFlag> flags) throws IOException { try { ModifyCacheDirectiveRequestProto.Builder builder = ModifyCacheDirectiveRequestProto.newBuilder(). setInfo(PBHelperClient.convert(directive)); if (!flags.isEmpty()) { builder.setCacheFlags(PBHelperClient.convertCacheFlags(flags)); } rpcProxy.modifyCacheDirective(null, builder.build()); } catch (ServiceException e) { throw ProtobufHelper.getRemoteException(e); } }
@Override public ModifyCacheDirectiveResponseProto modifyCacheDirective( RpcController controller, ModifyCacheDirectiveRequestProto request) throws ServiceException { try { server.modifyCacheDirective( PBHelperClient.convert(request.getInfo()), PBHelperClient.convertCacheFlags(request.getCacheFlags())); return ModifyCacheDirectiveResponseProto.newBuilder().build(); } catch (IOException e) { throw new ServiceException(e); } }