package org.kne.cloud.network.congestion;

import java.util.HashMap;
import java.util.Map;

public class CongestionAlgorithms {
	private static Map<String,CongestionAlgorithmFactory>regs=new HashMap();
	static {
		register(new BBRCongestionAlgorithmFactory());
		register(new Vegas2CongestionAlgorithmFactory());
	}
	public static void register(CongestionAlgorithmFactory algorithm) {
		regs.put(algorithm.getName(), algorithm);
	}
	public static CongestionAlgorithm get(String name) {
		return regs.get(name).create();
	}
}
