Changeset 2088 for trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs
- Timestamp:
- 06/24/09 17:27:17 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.Server/3.3/Server.cs
r2075 r2088 32 32 using HeuristicLab.Grid; 33 33 using HeuristicLab.Grid.HiveBridge; 34 using HeuristicLab.Core; 34 35 35 36 namespace HeuristicLab.CEDMA.Server { 36 public class Server {37 public class Server : IViewable { 37 38 private static readonly string rdfFile = AppDomain.CurrentDomain.BaseDirectory + "rdf_store.db3"; 38 39 private static readonly string rdfConnectionString = "sqlite:rdf:Data Source=\"" + rdfFile + "\""; … … 40 41 private ServiceHost host; 41 42 private Store store; 43 42 44 private IDispatcher dispatcher; 45 public IDispatcher Dispatcher { get { return dispatcher; } } 43 46 private IExecuter executer; 47 public IExecuter Executer { get { return executer; } } 44 48 45 49 private string gridServiceUrl; … … 53 57 get { return cedmaServiceUrl; } 54 58 set { cedmaServiceUrl = value; } 55 }56 57 private int maxActiveJobs;58 public int MaxActiveJobs {59 get { return maxActiveJobs; }60 set {61 if (value > 0) {62 maxActiveJobs = value;63 if (executer != null) {64 executer.MaxActiveJobs = value;65 }66 }67 }68 59 } 69 60 … … 80 71 cedmaServiceUrl = "net.tcp://" + addresses[index] + ":8002/CEDMA"; 81 72 store = new Store(rdfConnectionString); 82 maxActiveJobs = 10;83 73 } 84 74 … … 103 93 } 104 94 105 internal string[] GetActiveJobDescriptions() {106 if (executer != null) return executer.GetJobs();107 else return new string[] { };108 }109 110 95 internal void Connect(string serverUrl) { 111 96 dispatcher = new SimpleDispatcher(store); … … 118 103 } 119 104 executer = new GridExecuter(dispatcher, store, gridServer); 120 executer.MaxActiveJobs = MaxActiveJobs;121 105 executer.Start(); 122 106 } 107 #region IViewable Members 108 109 public IView CreateView() { 110 return new ServerForm(this); 111 } 112 113 #endregion 123 114 } 124 115 }
Note: See TracChangeset
for help on using the changeset viewer.