Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
12/29/10 00:52:06 (14 years ago)
Author:
cneumuel
Message:

#1260

  • migrated to .NET 4.0
  • moved state-information about heartbeat timestamps into DB to reduce IIS-recycling issues
  • optimized memory usage of ExperimentManager when lots of large jobs are downloaded
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.3/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/LifecycleManager.cs

    r5093 r5179  
    2929
    3030namespace HeuristicLab.Hive.Server.Core {
    31   class LifecycleManager : ILifecycleManager {
     31  public class LifecycleManager : ILifecycleManager {
    3232    private readonly string pluginDir = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "App_Data\\Plugins");
    3333    private AutoResetEvent waitHandle;
     
    3535    private bool shutdownRequested;
    3636    private PluginManager pm;
    37 
    38     private Dictionary<Guid, DateTime> lastHeartbeats = new Dictionary<Guid, DateTime>();
    39     public Dictionary<Guid, DateTime> LastHeartbeats {
    40       get { return lastHeartbeats; }
    41     }
    42 
    43     /// <summary>
    44     /// Contains a list job JobIds which have been sent to a slave, but the slave has not yet sent
    45     /// a jobProgress of the job with a heartbeat, because he has not finished downloading/deserializing it.
    46     /// The number value indicates a TimeToLive count that is decremented with each server-heartbeat.
    47     /// When the number reaches zero, the jobs is assumed to be lost and is set Offline again.
    48     /// </summary>
    49     private Dictionary<Guid, int> newAssignedJobs = new Dictionary<Guid, int>();
    50     public Dictionary<Guid, int> NewAssignedJobs {
    51       get { return newAssignedJobs; }
    52     }
    53 
    54     /// <summary>
    55     /// When a slave reconnects and he has finished results waiting it calls IsJobStillNeeded. If the finished
    56     /// result has not yet been collected from anywhere else, the job will be sent by the slave and the job state is set to Pending.
    57     /// Now the job be in pending state until it is received from the reconnected slave or the TimeToLive value of this dictionary has reached zero.
    58     /// </summary>
    59     private Dictionary<Guid, int> pendingJobs = new Dictionary<Guid, int>();
    60     public Dictionary<Guid, int> PendingJobs {
    61       get { return pendingJobs; }
    62     }
    6337
    6438    private TimeSpan interval = new TimeSpan(0, 0, 10);
Note: See TracChangeset for help on using the changeset viewer.