Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/17/13 10:51:42 (11 years ago)
Author:
pfleck
Message:

#2030:
Updated license year in headers and AssemblyInfo.
Removed empty regions in OptimizedHiveDao and IOptimizedHiveDao.
The ServiceLocator handles creation of the OptimizedHiveDao different to make the OptimizedHiveDao available for non-service operation calls:

  • if the ServiceLocator is called _within_ a service operation, the same DB-context is used for the whole service operation, and therefore is stored in the service operation context.
  • if the ServiceLocator is called _outside_ a service operation, a new DB-context is created on each ServiceLocator call.
Location:
branches/HivePerformance/sources
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/HivePerformance/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs

    r9539 r9634  
    438438
    439439        refreshableJob.Progress.Status = "Downloading tasks...";
    440         downloader = new TaskDownloader(allTasks.Select(x => x.Id), refreshableJob.Log);
     440        downloader = new TaskDownloader(allTasks.Select(x => x.Id));
    441441        downloader.StartAsync();
    442442
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.cs

    r9539 r9634  
    2323using System.Data.Linq.Mapping;
    2424namespace HeuristicLab.Services.Hive.DataAccess {
    25   partial class SlaveStatistics {
    26   }
    27 
    2825  partial class HiveDataContext {
    2926    // source: http://stackoverflow.com/questions/648196/random-row-from-linq-to-sql
    3027    [Function(Name = "NEWID", IsComposable = true)]
    31     public Guid Random() { 
     28    public Guid Random() {
    3229      // to prove not used by our C# code...
    3330      throw new NotImplementedException();
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive.SelfHost/3.3/Program.cs

    r9434 r9634  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive.SelfHost/3.3/Properties/AssemblyInfo.cs.frame

    r9434 r9634  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3232[assembly: AssemblyCompany("")]
    3333[assembly: AssemblyProduct("HeuristicLab")]
    34 [assembly: AssemblyCopyright("(c) 2002-2012 HEAL")]
     34[assembly: AssemblyCopyright("(c) 2002-2013 HEAL")]
    3535[assembly: AssemblyTrademark("")]
    3636[assembly: AssemblyCulture("")]
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/HiveOperationContext.cs

    r9444 r9634  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    3333    public static HiveOperationContext Current {
    3434      get {
    35         return OperationContext.Current.Extensions.Find<HiveOperationContext>();
     35        return OperationContext.Current != null
     36          ? OperationContext.Current.Extensions.Find<HiveOperationContext>()
     37          : null;
    3638      }
    3739    }
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/Interfaces/IOptimizedHiveDao.cs

    r9434 r9634  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    1919 */
    2020#endregion
    21 
    2221
    2322using System;
     
    5049    #endregion
    5150
    52     #region StateLog Methods
    53 
    54     #endregion
    55 
    56     #region Job Methods
    57 
    58     #endregion
    59 
    60     #region JobPermission Methods
    61 
    62     #endregion
    63 
    6451    #region Plugin Methods
    6552    Plugin GetPluginById(Guid pluginId);
    66     #endregion
    67 
    68     #region PluginData Methods
    69 
    7053    #endregion
    7154
     
    7962    #endregion
    8063
    81     #region SlaveGroup Methods
    82 
    83     #endregion
    84 
    8564    #region Resource Methods
    8665    IEnumerable<Guid> GetAssignedResourceIds(Guid jobId);
    8766    #endregion
    88 
    89     #region ResourcePermission Methods
    90 
    91     #endregion
    92 
    93     #region Authorization Methods
    94 
    95     #endregion
    96 
    97     #region Lifecycle Methods
    98 
    99     #endregion
    100 
    101     #region Downtime Methods
    102     #endregion
    103 
    104     #region Statistics Methods
    105 
    106     #endregion
    107 
    108     #region UserPriority Methods
    109 
    110     #endregion
    11167  }
    11268}
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/OptimizedHiveDao.cs

    r9485 r9634  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2012 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2828namespace HeuristicLab.Services.Hive.DataAccess {
    2929  public class OptimizedHiveDao : IOptimizedHiveDao {
    30     private static HiveDataContext Db { get { return HiveOperationContext.Current.DataContext; } }
     30    private HiveDataContext Db { get; set; }
     31
     32    public OptimizedHiveDao(HiveDataContext db) {
     33      Db = db;
     34    }
    3135
    3236    #region Task Methods
     
    181185    #endregion
    182186
    183     #region StateLog Methods
    184 
    185     #endregion
    186 
    187     #region Job Methods
    188 
    189     #endregion
    190 
    191     #region JobPermission Methods
    192 
    193     #endregion
    194 
    195187    #region Plugin Methods
    196188    public Plugin GetPluginById(Guid pluginId) {
     
    203195      select p
    204196    );
    205 
    206     #endregion
    207 
    208     #region PluginData Methods
    209 
    210197    #endregion
    211198
     
    249236    #endregion
    250237
    251     #region SlaveGroup Methods
    252 
    253     #endregion
    254 
    255238    #region Resource Methods
    256239    public IEnumerable<Guid> GetAssignedResourceIds(Guid taskId) {
     
    264247    );
    265248    #endregion
    266 
    267     #region ResourcePermission Methods
    268 
    269     #endregion
    270 
    271     #region Authorization Methods
    272 
    273     #endregion
    274 
    275     #region Lifecycle Methods
    276 
    277     #endregion
    278 
    279     #region Downtime Methods
    280     #endregion
    281 
    282     #region Statistics Methods
    283 
    284     #endregion
    285 
    286     #region UserPriority Methods
    287 
    288     #endregion
    289 
    290     #region Helpers
    291 
    292     #endregion
    293249  }
    294250}
  • branches/HivePerformance/sources/HeuristicLab.Services.Hive/3.3/ServiceLocator.cs

    r9539 r9634  
    4242    }
    4343
    44     private IOptimizedHiveDao optimizedHiveDao;
    4544    public IOptimizedHiveDao OptimizedHiveDao {
    4645      get {
    47         if (optimizedHiveDao == null) optimizedHiveDao = new OptimizedHiveDao();
    48         return optimizedHiveDao;
     46        var dataContext = HiveOperationContext.Current != null
     47                            ? HiveOperationContext.Current.DataContext
     48                            : new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString);
     49        return new OptimizedHiveDao(dataContext);
    4950      }
    5051    }
Note: See TracChangeset for help on using the changeset viewer.