Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/08/15 15:51:32 (9 years ago)
Author:
dglaser
Message:

#2388:

HeuristicLab.Services.Access:
HeuristicLab.Services.Access.DataAccess:

  • Changed connection strings and certificates for local usage

HeuristicLab.Services.Hive.DataAccess:

  • Added compiled queries for frequently used queries
  • Integrated string queries from OptimizedHiveDao

HeuristicLab.Services.Hive:

  • Added NewHeartbeatManager.cs
  • Added NewRoundRobinTaskScheduler.cs
  • Added PerformanceLogger
  • Updated AuthoriziationManager
  • Updated NewHiveService
    • Added Regions
    • Implemented missing methods
    • Improved performance of several queries

HeuristicLab.Services.WebApp.Status:

  • Fixed a bug which caused an error when calculating the average waiting time.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HiveStatistics/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Manager/PersistenceManager.cs

    r12468 r12691  
    3535
    3636    #region Hive daos
     37
     38    private AssignedResourceDao assignedResourceDao;
    3739    public AssignedResourceDao AssignedResourceDao {
    38       get { return new AssignedResourceDao(dataContext); }
    39     }
    40 
     40      get { return assignedResourceDao ?? (assignedResourceDao = new AssignedResourceDao(dataContext)); }
     41    }
     42
     43    private DowntimeDao downtimeDao;
    4144    public DowntimeDao DowntimeDao {
    42       get { return new DowntimeDao(dataContext); }
    43     }
    44 
     45      get { return downtimeDao ?? (downtimeDao = new DowntimeDao(dataContext)); }
     46    }
     47
     48    private JobDao jobDao;
    4549    public JobDao JobDao {
    46       get { return new JobDao(dataContext); }
    47     }
    48 
     50      get { return jobDao ?? (jobDao = new JobDao(dataContext)); }
     51    }
     52
     53    private JobPermissionDao jobPermissionDao;
    4954    public JobPermissionDao JobPermissionDao {
    50       get { return new JobPermissionDao(dataContext); }
    51     }
    52 
     55      get { return jobPermissionDao ?? (jobPermissionDao = new JobPermissionDao(dataContext)); }
     56    }
     57
     58    private LifecycleDao lifecycleDao;
    5359    public LifecycleDao LifecycleDao {
    54       get { return new LifecycleDao(dataContext); }
    55     }
    56 
     60      get { return lifecycleDao ?? (lifecycleDao = new LifecycleDao(dataContext)); }
     61    }
     62
     63    private PluginDao pluginDao;
    5764    public PluginDao PluginDao {
    58       get { return new PluginDao(dataContext); }
    59     }
    60 
     65      get { return pluginDao ?? (pluginDao = new PluginDao(dataContext)); }
     66    }
     67
     68    private PluginDataDao pluginDataDao;
    6169    public PluginDataDao PluginDataDao {
    62       get { return new PluginDataDao(dataContext); }
    63     }
    64 
     70      get { return pluginDataDao ?? (pluginDataDao = new PluginDataDao(dataContext)); }
     71    }
     72
     73    private RequiredPluginDao requiredPluginDao;
    6574    public RequiredPluginDao RequiredPluginDao {
    66       get { return new RequiredPluginDao(dataContext); }
    67     }
    68 
     75      get { return requiredPluginDao ?? (requiredPluginDao = new RequiredPluginDao(dataContext)); }
     76    }
     77
     78    private ResourceDao resourceDao;
    6979    public ResourceDao ResourceDao {
    70       get { return new ResourceDao(dataContext); }
    71     }
    72 
     80      get { return resourceDao ?? (resourceDao = new ResourceDao(dataContext)); }
     81    }
     82
     83    private ResourcePermissionDao resourcePermissionDao;
    7384    public ResourcePermissionDao ResourcePermissionDao {
    74       get { return new ResourcePermissionDao(dataContext); }
    75     }
    76 
     85      get { return resourcePermissionDao ?? (resourcePermissionDao = new ResourcePermissionDao(dataContext)); }
     86    }
     87
     88    private SlaveDao slaveDao;
    7789    public SlaveDao SlaveDao {
    78       get { return new SlaveDao(dataContext); }
    79     }
    80 
     90      get { return slaveDao ?? (slaveDao = new SlaveDao(dataContext)); }
     91    }
     92
     93    private SlaveGroupDao slaveGroupDao;
    8194    public SlaveGroupDao SlaveGroupDao {
    82       get { return new SlaveGroupDao(dataContext); }
    83     }
    84 
     95      get { return slaveGroupDao ?? (slaveGroupDao = new SlaveGroupDao(dataContext)); }
     96    }
     97
     98    private StateLogDao stateLogDao;
    8599    public StateLogDao StateLogDao {
    86       get { return new StateLogDao(dataContext); }
    87     }
    88 
     100      get { return stateLogDao ?? (stateLogDao = new StateLogDao(dataContext)); }
     101    }
     102
     103    private TaskDao taskDao;
    89104    public TaskDao TaskDao {
    90       get { return new TaskDao(dataContext); }
    91     }
    92 
     105      get { return taskDao ?? (taskDao = new TaskDao(dataContext)); }
     106    }
     107
     108    private TaskDataDao taskDataDao;
    93109    public TaskDataDao TaskDataDao {
    94       get { return new TaskDataDao(dataContext); }
    95     }
    96 
     110      get { return taskDataDao ?? (taskDataDao = new TaskDataDao(dataContext)); }
     111    }
     112
     113    private UserPriorityDao userPriorityDao;
    97114    public UserPriorityDao UserPriorityDao {
    98       get { return new UserPriorityDao(dataContext); }
     115      get { return userPriorityDao ?? (userPriorityDao = new UserPriorityDao(dataContext)); }
    99116    }
    100117    #endregion
    101118
    102119    #region HiveStatistics daos
     120
     121    private DimClientDao dimClientDao;
    103122    public DimClientDao DimClientDao {
    104       get { return new DimClientDao(dataContext); }
    105     }
    106 
     123      get { return dimClientDao ?? (dimClientDao = new DimClientDao(dataContext)); }
     124    }
     125
     126    private DimJobDao dimJobDao;
    107127    public DimJobDao DimJobDao {
    108       get { return new DimJobDao(dataContext); }
    109     }
    110 
     128      get { return dimJobDao ?? (dimJobDao = new DimJobDao(dataContext)); }
     129    }
     130
     131    private DimTimeDao dimTimeDao;
    111132    public DimTimeDao DimTimeDao {
    112       get { return new DimTimeDao(dataContext); }
    113     }
    114 
     133      get { return dimTimeDao ?? (dimTimeDao = new DimTimeDao(dataContext)); }
     134    }
     135
     136    private DimUserDao dimUserDao;
    115137    public DimUserDao DimUserDao {
    116       get { return new DimUserDao(dataContext); }
    117     }
    118 
     138      get { return dimUserDao ?? (dimUserDao = new DimUserDao(dataContext)); }
     139    }
     140
     141    private FactClientInfoDao factClientInfoDao;
    119142    public FactClientInfoDao FactClientInfoDao {
    120       get { return new FactClientInfoDao(dataContext); }
    121     }
    122 
     143      get { return factClientInfoDao ?? (factClientInfoDao = new FactClientInfoDao(dataContext)); }
     144    }
     145
     146    private FactTaskDao factTaskDao;
    123147    public FactTaskDao FactTaskDao {
    124       get { return new FactTaskDao(dataContext); }
     148      get { return factTaskDao ?? (factTaskDao = new FactTaskDao(dataContext)); }
    125149    }
    126150    #endregion
     
    130154      if (longRunning) context.CommandTimeout = (int)Settings.Default.LongRunningDatabaseCommandTimeout.TotalSeconds;
    131155      dataContext = context;
     156    }
     157
     158    public PersistenceManager(DataContext dataContext) {
     159      this.dataContext = dataContext;
    132160    }
    133161
     
    179207
    180208    public void Dispose() {
    181       if (dataContext != null) {
    182         dataContext.Dispose();
    183       }
     209      //if (dataContext != null) {
     210      //  dataContext.Dispose();
     211      //}
    184212    }
    185213  }
Note: See TracChangeset for help on using the changeset viewer.