Free cookie consent management tool by TermsFeed Policy Generator

source: branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/ServiceLocator.cs @ 5591

Last change on this file since 5591 was 5405, checked in by cneumuel, 14 years ago

#1233

  • moved heartbeat timestamps of slaves and jobs into database to make server stateless
  • made slave use the right authentication ("hiveslave" instead of HL username/password)
  • moved heartbeat related methods into HeartbeatManager
  • changed signature of Service.Hello method, so all hardware related information is transferred in that method withing the Slave-object
File size: 1.6 KB
Line 
1using System;
2using System.Collections.Generic;
3using System.Linq;
4using System.Text;
5using HeuristicLab.Services.Hive.DataAccess;
6
7namespace HeuristicLab.Services.Hive {
8
9  public class ServiceLocator : IServiceLocator {
10    private static IServiceLocator instance;
11    public static IServiceLocator Instance {
12      get {
13        if (instance == null) instance = new ServiceLocator();
14        return instance;
15      }
16      set { instance = value; }
17    }
18
19    private IHiveDao hiveDao;
20    public IHiveDao HiveDao {
21      get {
22        if (hiveDao == null) hiveDao = new HiveDao();
23        return hiveDao;
24      }
25    }
26   
27    private TransactionManager transactionManager;
28    public TransactionManager TransactionManager {
29      get {
30        if (transactionManager == null) transactionManager = new TransactionManager();
31        return transactionManager;
32      }
33    }
34
35    private IAuthorizationManager authorizationManager;
36    public IAuthorizationManager AuthorizationManager {
37      get {
38        if (authorizationManager == null) authorizationManager = new AuthorizationManager();
39        return authorizationManager;
40      }
41    }
42
43    private ILifecycleManager lifecycleManager;
44    public ILifecycleManager LifecycleManager {
45      get {
46        if (lifecycleManager == null) lifecycleManager = new LifecycleManager();
47        return lifecycleManager;
48      }
49    }
50
51    private HeartbeatManager heartbeatManager;
52    public HeartbeatManager HeartbeatManager {
53      get {
54        if(heartbeatManager == null) heartbeatManager = new HeartbeatManager();
55        return heartbeatManager;
56      }
57    }
58  }
59}
Note: See TracBrowser for help on using the repository browser.