Exemple #1
0
        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);
        }
Exemple #2
0
 public void Update(ServiceLevelAgreement sla)
 {
     for (int i = 0; i < subSLAs.Count; i++)
     {
         this[i].Update(sla[i]);
     }
 }