Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/06/13 12:30:18 (11 years ago)
Author:
pfleck
Message:

#2030
Switched Text encoding to Mtom encoding for better performance for binary data.
Merged trunk into branch.

Location:
branches/HivePerformance/sources
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources

  • branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/RefreshableJob.cs

    r9219 r9444  
    110110            }
    111111          } else {
    112             StopResultPolling();
     112            PauseResultPolling();
    113113          }
    114114        }
     
    157157    }
    158158
    159     // may execute jobs with privileged permissions on slaves
    160     public bool IsAllowedPrivileged {
    161       get { return Job.IsPrivileged; }
    162       set {
    163         if (value != Job.IsPrivileged) {
    164           Job.IsPrivileged = value;
    165           OnIsAllowedPrivilegedChanged();
    166         }
    167       }
    168     }
    169 
    170159    private Progress progress;
    171160    public Progress Progress {
     
    196185      this.HiveTasks = new ItemCollection<HiveTask>();
    197186    }
    198     public RefreshableJob(Job hiveExperiment) {
     187    public RefreshableJob(Job hiveJob) {
    199188      this.refreshAutomatically = true;
    200       this.Job = hiveExperiment;
     189      this.Job = hiveJob;
    201190      this.log = new ThreadSafeLog();
    202191      this.jobDownloader = new ConcurrentTaskDownloader<ItemTask>(Settings.Default.MaxParallelDownloads, Settings.Default.MaxParallelDownloads);
     
    239228    public void StopResultPolling() {
    240229      if (jobResultPoller != null && jobResultPoller.IsPolling) {
     230        refreshAutomatically = false;
    241231        jobResultPoller.Stop();
    242232        DeregisterResultPollingEvents();
     233        jobResultPoller = null;
     234      }
     235    }
     236
     237    public void PauseResultPolling() {
     238      if (jobResultPoller != null && jobResultPoller.IsPolling) {
     239        jobResultPoller.Stop();
    243240      }
    244241    }
     
    425422    }
    426423
    427     public event EventHandler IsAllowedPrivilegedChanged;
    428     private void OnIsAllowedPrivilegedChanged() {
    429       var handler = IsAllowedPrivilegedChanged;
    430       if (handler != null) handler(this, EventArgs.Empty);
    431     }
    432 
    433424    public event EventHandler JobStatisticsChanged;
    434425    private void OnJobStatisticsChanged() {
     
    515506    public event EventHandler HiveTasksChanged;
    516507    protected virtual void OnHiveTasksChanged() {
    517       StopResultPolling();
    518508      if (this.HiveTasks != null && this.HiveTasks.Count > 0 && this.GetAllHiveTasks().All(x => x.Task.Id != Guid.Empty)) {
    519509        if (IsFinished()) {
    520510          this.ExecutionState = Core.ExecutionState.Stopped;
    521511          this.RefreshAutomatically = false;
    522           if (jobResultPoller != null) DeregisterResultPollingEvents();
     512          StopResultPolling();
    523513        } else {
    524514          this.RefreshAutomatically = true;
Note: See TracChangeset for help on using the changeset viewer.