public ConsistencySLAEngine(ServiceLevelAgreement sla, ReplicaConfiguration config, SessionState sessionState = null, ServerMonitor monitor = null, ChosenUtility chosenUtility = null) { this.Sla = sla; this.Config = config; if (sessionState != null) { this.Session = sessionState; } else { this.Session = new SessionState(); } if (monitor != null) { this.Monitor = monitor; } else { this.Monitor = new ServerMonitor(config); } this.chosenUtility = chosenUtility; this.selector = new ServerSelector(Session, Config, Monitor); }
public void Update(ServiceLevelAgreement sla) { for (int i = 0; i < subSLAs.Count; i++) { this[i].Update(sla[i]); } }