Last change
on this file since 5597 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
|
Rev | Line | |
---|
[5028] | 1 | using System;
|
---|
| 2 | using System.Collections.Generic;
|
---|
| 3 | using System.Linq;
|
---|
| 4 | using System.Text;
|
---|
| 5 | using HeuristicLab.Services.Hive.DataAccess;
|
---|
| 6 |
|
---|
| 7 | namespace HeuristicLab.Services.Hive {
|
---|
| 8 |
|
---|
[5095] | 9 | public class ServiceLocator : IServiceLocator {
|
---|
| 10 | private static IServiceLocator instance;
|
---|
| 11 | public static IServiceLocator Instance {
|
---|
[5028] | 12 | get {
|
---|
| 13 | if (instance == null) instance = new ServiceLocator();
|
---|
| 14 | return instance;
|
---|
| 15 | }
|
---|
[5095] | 16 | set { instance = value; }
|
---|
[5028] | 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 |
|
---|
[5095] | 43 | private ILifecycleManager lifecycleManager;
|
---|
| 44 | public ILifecycleManager LifecycleManager {
|
---|
[5028] | 45 | get {
|
---|
[5095] | 46 | if (lifecycleManager == null) lifecycleManager = new LifecycleManager();
|
---|
| 47 | return lifecycleManager;
|
---|
[5028] | 48 | }
|
---|
| 49 | }
|
---|
[5405] | 50 |
|
---|
| 51 | private HeartbeatManager heartbeatManager;
|
---|
| 52 | public HeartbeatManager HeartbeatManager {
|
---|
| 53 | get {
|
---|
| 54 | if(heartbeatManager == null) heartbeatManager = new HeartbeatManager();
|
---|
| 55 | return heartbeatManager;
|
---|
| 56 | }
|
---|
| 57 | }
|
---|
[5028] | 58 | }
|
---|
| 59 | }
|
---|
Note: See
TracBrowser
for help on using the repository browser.