*/
public class LoadBalanceFactory {
public static Node getNextExtractNode(Long pipelineId) throws InterruptedException {
Pipeline pipeline = ArbitrateConfigUtils.getPipeline(pipelineId);
LoadBanlanceAlgorithm loadBanlanceAlgorithm = pipeline.getParameters().getLbAlgorithm();
LoadBalance loadbalance = null;
if (loadBanlanceAlgorithm.isRandom()) {
loadbalance = ArbitrateFactory.getInstance(pipelineId, ExtractRandomLoadBanlance.class);
} else if (loadBanlanceAlgorithm.isRoundRbin()) {
loadbalance = ArbitrateFactory.getInstance(pipelineId, ExtractRoundRobinLoadBalance.class);
} else {
loadbalance = ArbitrateFactory.getInstance(pipelineId, ExtractStickLoadBalance.class);
}
Node node = loadbalance.next();// 获取下一个处理节点信息