Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/16/11 14:20:48 (13 years ago)
Author:
cneumuel
Message:

#1233

  • changed Log to ThreadSafeLog
  • added license information to all files
  • added assembly descriptions
  • using blocks before namespace
  • made TransactionManager static
  • removed DaoException
  • removed TimeSpanExtensions
  • renamed prepareHiveDatabase.sql should be renamed to Prepare Hive Database.sql
  • created Initialize Hive Database.sql
Location:
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4
Files:
1 deleted
2 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj

    r6419 r6431  
    117117    <Compile Include="StateLogList.cs" />
    118118    <Compile Include="StateLogListList.cs" />
    119     <Compile Include="ThreadSafeLog.cs" />
    120119    <None Include="app_f005pc.config" />
    121120    <None Include="app_services.config" />
    122121    <None Include="app.config" />
     122    <None Include="ClassDiagram2.cd" />
    123123    <None Include="HeuristicLabClientsHivePlugin.cs.frame" />
    124124    <Compile Include="Exceptions\AddJobToHiveException.cs" />
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/RefreshableHiveExperiment.cs

    r6419 r6431  
    8282    }
    8383
    84     private ILog log;
     84    private ThreadSafeLog log;
    8585    public ILog Log {
    8686      get { return log; }
    87       set { log = value; }
    88     }
    89     private static object logLocker = new object();
     87    }
    9088
    9189    #region Constructors and Cloning
     
    9391      this.refreshAutomatically = true;
    9492      this.HiveExperiment = new HiveExperiment();
    95       this.log = new Log();
     93      this.log = new ThreadSafeLog(new Log());
    9694      this.jobDownloader = new ConcurrentJobDownloader<ItemJob>(2, 2);
    9795      this.jobDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(jobDownloader_ExceptionOccured);
     
    10098      this.refreshAutomatically = true;
    10199      this.HiveExperiment = hiveExperiment;
    102       this.log = new Log();
     100      this.log = new ThreadSafeLog(new Log());
    103101      this.jobDownloader = new ConcurrentJobDownloader<ItemJob>(2, 2);
    104102      this.jobDownloader.ExceptionOccured += new EventHandler<EventArgs<Exception>>(jobDownloader_ExceptionOccured);
     
    108106      this.HiveExperiment = original.HiveExperiment;
    109107      this.IsControllable = original.IsControllable;
    110       this.Log = cloner.Clone(original.Log);
     108      this.log = cloner.Clone(original.log);
    111109      this.RefreshAutomatically = false; // do not start results polling automatically
    112110      this.jobDownloader = new ConcurrentJobDownloader<ItemJob>(2, 2);
     
    180178
    181179          if (!hiveJob.IsFinishedJobDownloaded && !hiveJob.IsDownloading && hiveJob.Job.LastJobDataUpdate < lightweightJob.LastJobDataUpdate) {
    182             LogMessage(string.Format("Downloading job {0}", lightweightJob.Id));
     180            log.LogMessage(string.Format("Downloading job {0}", lightweightJob.Id));
    183181            hiveJob.IsDownloading = true;
    184182            jobDownloader.DownloadJob(hiveJob.Job, (localJob, itemJob) => {
    185               LogMessage(string.Format("Finished downloading job {0}", localJob.Id));
     183              log.LogMessage(string.Format("Finished downloading job {0}", localJob.Id));
    186184              HiveJob localHiveJob = GetHiveJobById(localJob.Id);
    187185
     
    222220    }
    223221
    224     // synchronized logging
    225     private void LogException(Exception exception) {
    226       lock (logLocker) {
    227         this.log.LogException(exception);
    228       }
    229     }
    230     // synchronized logging
    231     private void LogMessage(string message) {
    232       lock (logLocker) {
    233         this.log.LogMessage(message);
    234       }
    235     }
    236 
    237222    public HiveJob GetHiveJobById(Guid jobId) {
    238223      foreach (HiveJob job in hiveExperiment.HiveJobs) {
     
    356341    public event EventHandler<EventArgs<Exception>> ExceptionOccured;
    357342    private void OnExceptionOccured(Exception exception) {
    358       LogException(exception);
     343      log.LogException(exception);
    359344      var handler = ExceptionOccured;
    360345      if (handler != null) handler(this, new EventArgs<Exception>(exception));
     
    390375      get { return hiveExperiment.ItemVersion; }
    391376    }
    392 
    393 
     377   
    394378    #region IProgressReporter Members
    395379    public IProgress Progress {
Note: See TracChangeset for help on using the changeset viewer.