public Long apply(Long pipelineId) {
// 处理下pipline -> channel映射关系不存在的情况
Channel channel = channelService.findByPipelineId(pipelineId);
if (channel == null) {
throw new ConfigException("No Such Channel by pipelineId[" + pipelineId + "]");
}
updateMapping(channel, pipelineId);// 排除下自己
channelCache.put(channel.getId(), channel);// 更新下channelCache
return channel.getId();