Пример #1
0
        /// <summary>
        /// Saves the processing velocity.
        /// </summary>
        /// <param name="processingVelocityEntity">The processing velocity entity.</param>
        private void SaveProcessingVelocity(ProcessingVelocityEntity processingVelocityEntity)
        {
            var repository = GetReopsitory(processingVelocityEntity);
            var serviceInfo = GetServiceInfo(processingVelocityEntity.Identification, repository);

            UpdateEntity(serviceInfo, processingVelocityEntity, (s =>
                                                                     {
                                                                         s.NumberMessagesProcessed =processingVelocityEntity.NumberMessagesProcessed;
                                                                         s.Velocity = processingVelocityEntity.Velocity;
                                                                         s.Latency = processingVelocityEntity.Latency;
                                                                         s.PeakMaxLatency = processingVelocityEntity.PeakMaxLatency;
                                                                         s.PeakMinLatency = processingVelocityEntity.PeakMinLatency;
                                                                     }));

            Save(serviceInfo, repository, (bd =>
                                               {
                                                   bd.SetValue(be => be.NumberMessagesProcessed, serviceInfo.NumberMessagesProcessed);
                                                   bd.SetValue(be => be.Velocity, serviceInfo.Velocity);
                                                   bd.SetValue(be => be.Latency, serviceInfo.Latency);
                                                   bd.SetValue(be => be.PeakMaxLatency, serviceInfo.PeakMaxLatency);
                                                   bd.SetValue(be => be.PeakMinLatency, serviceInfo.PeakMinLatency);
                                               }));
        }
Пример #2
0
 /// <summary>
 /// Modifies the processing velocity.
 /// </summary>
 /// <param name="processingVelocityEntity">The processing velocity entity.</param>
 public void ModifyProcessingVelocity(ProcessingVelocityEntity processingVelocityEntity)
 {
     if (!IdentitySpec.Instance.IsSatisfiedBy(processingVelocityEntity.Identification)) return;
     SaveProcessingVelocity(processingVelocityEntity);
 }