use of com.ctrip.xpipe.redis.meta.server.rest.exception.UnfoundAliveSererException in project x-pipe by ctripcorp.
the class AbstractDispatcherMetaServerController method populateModel.
@ModelAttribute
public void populateModel(@PathVariable final String clusterId, @RequestHeader(name = MetaServerService.HTTP_HEADER_FOWRARD, required = false) ForwardInfo forwardInfo, Model model, HttpServletRequest request) {
if (forwardInfo != null) {
logger.info("[populateModel]{},{}", clusterId, forwardInfo);
}
MetaServer metaServer = getMetaServer(clusterId, forwardInfo, request.getRequestURI());
if (metaServer == null) {
throw new UnfoundAliveSererException(clusterId, slotManager.getServerIdByKey(clusterId), currentMetaServer.getServerId());
}
model.addAttribute(MODEL_META_SERVER, metaServer);
if (forwardInfo != null) {
model.addAttribute(forwardInfo);
}
}
Aggregations