public RemotingCommand getKVConfigByValue(ChannelHandlerContext ctx, RemotingCommand request)
throws RemotingCommandException {
final RemotingCommand response =
RemotingCommand.createResponseCommand(GetKVConfigResponseHeader.class);
final GetKVConfigResponseHeader responseHeader =
(GetKVConfigResponseHeader) response.getCustomHeader();
final GetKVConfigRequestHeader requestHeader =
(GetKVConfigRequestHeader) request.decodeCommandCustomHeader(GetKVConfigRequestHeader.class);
String value = this.namesrvController.getKvConfigManager().getKVConfigByValue(//
requestHeader.getNamespace(),//
requestHeader.getKey()//
);
if (value != null) {
responseHeader.setValue(value);
response.setCode(ResponseCode.SUCCESS_VALUE);
response.setRemark(null);
return response;
}