Changeset 6452 for branches/HeuristicLab.Hive-3.4/sources
- Timestamp:
- 06/20/11 14:16:53 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 7 added
- 6 deleted
- 33 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ResourcesView.cs
r6451 r6452 277 277 ServiceLocator.Instance.CallHiveService(service => { 278 278 var appointments = service.GetScheduleForResource(resourceId); 279 ItemList< Appointment> ias = new ItemList<Appointment>();279 ItemList<Downtime> ias = new ItemList<Downtime>(); 280 280 appointments.ForEach(a => ias.Add(a)); 281 281 scheduleView.Invoke(new Action(() => scheduleView.Content = ias)); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Administration/3.4/Views/ScheduleView.cs
r6451 r6452 33 33 namespace HeuristicLab.Clients.Hive.Administration.Views { 34 34 [View("ScheduleView")] 35 [Content(typeof(IItemList< Appointment>), IsDefaultView = true)]35 [Content(typeof(IItemList<Downtime>), IsDefaultView = true)] 36 36 public partial class ScheduleView : ItemView { 37 public new IItemList< Appointment> Content {38 get { return (IItemList< Appointment>)base.Content; }37 public new IItemList<Downtime> Content { 38 get { return (IItemList<Downtime>)base.Content; } 39 39 set { base.Content = value; } 40 40 } … … 93 93 private void UpdateCalendarFromContent() { 94 94 offlineTimes.Clear(); 95 foreach ( Appointmentapp in Content) {95 foreach (Downtime app in Content) { 96 96 offlineTimes.Add(new HiveAppointment { 97 97 AllDayEvent = app.AllDayEvent, … … 331 331 332 332 private void btnSaveCal_Click(object sender, EventArgs e) { 333 List< Appointment> appointments = new List<Appointment>();333 List<Downtime> appointments = new List<Downtime>(); 334 334 foreach (HiveAppointment app in offlineTimes) { 335 335 if (app.Deleted) { … … 340 340 }); 341 341 } else if (app.Changed) { 342 Appointment apdto = new Appointment{342 Downtime apdto = new Downtime { 343 343 AllDayEvent = app.AllDayEvent, 344 344 EndDate = app.EndDate, … … 355 355 //TODO: find a sane way to do this 356 356 ServiceLocator.Instance.CallHiveService(service => { 357 foreach ( Appointmentapp in appointments) {357 foreach (Downtime app in appointments) { 358 358 service.AddAppointment(app); 359 359 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Slave/3.4/WcfService.cs
r6426 r6452 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Common; 25 using HeuristicLab.Hive;26 using HeuristicLab.PluginInfrastructure;27 25 28 26 namespace HeuristicLab.Clients.Hive.SlaveCore { … … 62 60 public void UpdateJob(Job job) { 63 61 CallHiveService(s => s.UpdateJob(job)); 64 }65 66 public Guid AddChildJob(Guid parentJobId, Job job, IJob jobDataObject) {67 return CallHiveService(s => {68 JobData jobData = new JobData();69 IEnumerable<Type> types;70 jobData.Data = PersistenceUtil.Serialize(jobDataObject, out types);71 var plugins = new List<IPluginDescription>();72 PluginUtil.CollectDeclaringPlugins(plugins, types);73 job.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, new List<Plugin>(), new List<Plugin>(), plugins);74 return s.AddChildJob(parentJobId, job, jobData);75 });76 }77 78 public IEnumerable<JobData> GetChildJobs(Guid? parentJobId) {79 return CallHiveService(service => {80 IEnumerable<LightweightJob> msg = service.GetLightweightChildJobs(parentJobId, false, false);81 82 List<JobData> jobs = new List<JobData>();83 foreach (LightweightJob ljob in msg)84 jobs.Add(service.GetJobData(ljob.Id));85 86 return jobs;87 });88 }89 90 public void DeleteChildJobs(Guid jobId) {91 CallHiveService(s => s.DeleteChildJobs(jobId));92 62 } 93 63 #endregion -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Tests/ExperimentManagerTests.cs
r6433 r6452 47 47 rhc.HiveExperiment.HiveJobs.Add(new OptimizerHiveJob(optimizer)); 48 48 49 HiveClient.StartExperiment((Exception ex) => TestContext.WriteLine(ex.ToString()), rhc );49 HiveClient.StartExperiment((Exception ex) => TestContext.WriteLine(ex.ToString()), rhc, new CancellationToken()); 50 50 51 51 while (rhc.HiveExperiment.ExecutionState != Core.ExecutionState.Stopped) { 52 52 Thread.Sleep(500); 53 53 } 54 55 54 } 56 55 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Tests/HeuristicLab.Clients.Hive.Tests-3.4.csproj
r6433 r6452 363 363 </ProjectReference> 364 364 </ItemGroup> 365 <ItemGroup>366 <None Include="app.config" />367 </ItemGroup>368 365 <Import Project="$(MSBuildBinPath)\Microsoft.CSharp.targets" /> 369 366 <!-- To modify your build process, add your task inside one of the targets below and uncomment it. -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Tests/Mocks/MockServiceLocator.cs
r5599 r6452 3 3 4 4 namespace HeuristicLab.Clients.Hive.Tests { 5 public class MockServiceLocator {5 public class MockServiceLocator : IServiceLocator { 6 6 private string username; 7 7 public string Username { … … 28 28 return call(GetService()); 29 29 } 30 31 #region IServiceLocator Members 32 33 public void CallHiveService(Action<IHiveService> call) { 34 // how to do this? 35 } 36 37 public T CallHiveService<T>(Func<IHiveService, T> call) { 38 // how to do this? 39 throw new NotImplementedException(); 40 } 41 42 #endregion 30 43 } 31 44 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj
r6431 r6452 120 120 <None Include="app_services.config" /> 121 121 <None Include="app.config" /> 122 <None Include="ClassDiagram 2.cd" />122 <None Include="ClassDiagram.cd" /> 123 123 <None Include="HeuristicLabClientsHivePlugin.cs.frame" /> 124 124 <Compile Include="Exceptions\AddJobToHiveException.cs" /> … … 151 151 <Compile Include="Exceptions\ServiceClientFactoryException.cs" /> 152 152 <Compile Include="ScopeExtensions.cs" /> 153 <Compile Include="ServiceClients\ Appointment.cs" />153 <Compile Include="ServiceClients\Downtime.cs" /> 154 154 <Compile Include="ServiceClients\HiveItemCollection.cs" /> 155 155 <Compile Include="ServiceClients\IHiveItem.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HiveClient.cs
r6444 r6452 192 192 private Semaphore jobUploadSemaphore = new Semaphore(4, 4); // todo: take magic number into config 193 193 private static object jobCountLocker = new object(); 194 private static object pluginLocker = new object(); 194 195 private void UploadExperiment(RefreshableHiveExperiment refreshableHiveExperiment, CancellationToken cancellationToken) { 195 196 try { … … 285 286 jobCount[0]++; 286 287 } 287 JobData jobData = null; 288 List<IPluginDescription> plugins = null; 289 290 TryAndRepeat(() => { // workaround for persistence bug (thread-safe access to bitmaps) - remove later 291 if (hiveJob.ItemJob.ComputeInParallel && (hiveJob.ItemJob.Item is Optimization.Experiment || hiveJob.ItemJob.Item is Optimization.BatchRun)) { 292 hiveJob.Job.IsParentJob = true; 293 hiveJob.Job.FinishWhenChildJobsFinished = true; 294 jobData = hiveJob.GetAsJobData(true, out plugins); 295 } else { 296 hiveJob.Job.IsParentJob = false; 297 hiveJob.Job.FinishWhenChildJobsFinished = false; 298 jobData = hiveJob.GetAsJobData(false, out plugins); 299 } 300 }, 30, "Could not serialize job"); 288 JobData jobData; 289 List<IPluginDescription> plugins; 290 291 if (hiveJob.ItemJob.ComputeInParallel && (hiveJob.ItemJob.Item is Optimization.Experiment || hiveJob.ItemJob.Item is Optimization.BatchRun)) { 292 hiveJob.Job.IsParentJob = true; 293 hiveJob.Job.FinishWhenChildJobsFinished = true; 294 jobData = hiveJob.GetAsJobData(true, out plugins); 295 } else { 296 hiveJob.Job.IsParentJob = false; 297 hiveJob.Job.FinishWhenChildJobsFinished = false; 298 jobData = hiveJob.GetAsJobData(false, out plugins); 299 } 301 300 cancellationToken.ThrowIfCancellationRequested(); 302 301 303 302 TryAndRepeat(() => { 304 303 if (!cancellationToken.IsCancellationRequested) { 305 ServiceLocator.Instance.CallHiveService((s) => hiveJob.Job.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins)); 304 lock (pluginLocker) { 305 ServiceLocator.Instance.CallHiveService((s) => hiveJob.Job.PluginsNeededIds = PluginUtil.GetPluginDependencies(s, this.onlinePlugins, this.alreadyUploadedPlugins, plugins)); 306 } 306 307 } 307 308 }, -1, "Failed to upload plugins"); … … 333 334 var arguments = (Tuple<HiveJob, HiveJob>)tuple; 334 335 UploadJobWithChildren(progress, arguments.Item1, arguments.Item2, groups, jobCount, totalJobCount, configPluginId, hiveExperimentId, log, isPrivileged, cancellationToken); 335 }, new Tuple<HiveJob, HiveJob>(child, hiveJob 336 }, new Tuple<HiveJob, HiveJob>(child, hiveJob)) 336 337 .ContinueWith((x) => log.LogException(x.Exception), TaskContinuationOptions.OnlyOnFaulted)); 337 338 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs
r6426 r6452 82 82 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.StateLog))] 83 83 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))] 84 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive. Appointment))]84 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Downtime))] 85 85 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))] 86 86 public partial class HiveItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged { … … 938 938 "nsfer")] 939 939 [System.SerializableAttribute()] 940 public partial class Appointment: HeuristicLab.Clients.Hive.HiveItem {940 public partial class Downtime : HeuristicLab.Clients.Hive.HiveItem { 941 941 942 942 [System.Runtime.Serialization.OptionalFieldAttribute()] … … 1506 1506 1507 1507 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/AddAppointment", ReplyAction = "http://tempuri.org/IHiveService/AddAppointmentResponse")] 1508 System.Guid AddAppointment(HeuristicLab.Clients.Hive. Appointmentappointment);1508 System.Guid AddAppointment(HeuristicLab.Clients.Hive.Downtime appointment); 1509 1509 1510 1510 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/DeleteAppointment", ReplyAction = "http://tempuri.org/IHiveService/DeleteAppointmentResponse")] … … 1512 1512 1513 1513 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/UpdateAppointment", ReplyAction = "http://tempuri.org/IHiveService/UpdateAppointmentResponse")] 1514 void UpdateAppointment(HeuristicLab.Clients.Hive. Appointmentappointment);1514 void UpdateAppointment(HeuristicLab.Clients.Hive.Downtime appointment); 1515 1515 1516 1516 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/GetScheduleForResource", ReplyAction = "http://tempuri.org/IHiveService/GetScheduleForResourceResponse")] 1517 System.Collections.Generic.List<HeuristicLab.Clients.Hive. Appointment> GetScheduleForResource(System.Guid resourceId);1517 System.Collections.Generic.List<HeuristicLab.Clients.Hive.Downtime> GetScheduleForResource(System.Guid resourceId); 1518 1518 1519 1519 [System.ServiceModel.OperationContractAttribute(Action = "http://tempuri.org/IHiveService/AddJob", ReplyAction = "http://tempuri.org/IHiveService/AddJobResponse")] … … 1694 1694 } 1695 1695 1696 public System.Guid AddAppointment(HeuristicLab.Clients.Hive. Appointmentappointment) {1696 public System.Guid AddAppointment(HeuristicLab.Clients.Hive.Downtime appointment) { 1697 1697 return base.Channel.AddAppointment(appointment); 1698 1698 } … … 1702 1702 } 1703 1703 1704 public void UpdateAppointment(HeuristicLab.Clients.Hive. Appointmentappointment) {1704 public void UpdateAppointment(HeuristicLab.Clients.Hive.Downtime appointment) { 1705 1705 base.Channel.UpdateAppointment(appointment); 1706 1706 } 1707 1707 1708 public System.Collections.Generic.List<HeuristicLab.Clients.Hive. Appointment> GetScheduleForResource(System.Guid resourceId) {1708 public System.Collections.Generic.List<HeuristicLab.Clients.Hive.Downtime> GetScheduleForResource(System.Guid resourceId) { 1709 1709 return base.Channel.GetScheduleForResource(resourceId); 1710 1710 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/Util/PluginUtil.cs
r6444 r6452 30 30 namespace HeuristicLab.Clients.Hive { 31 31 public static class PluginUtil { 32 private static object locker = new object();33 32 34 33 /// <summary> … … 41 40 /// <returns></returns> 42 41 public static List<Guid> GetPluginDependencies(IHiveService service, List<Plugin> onlinePlugins, List<Plugin> alreadyUploadedPlugins, IEnumerable<IPluginDescription> neededPlugins) { 43 lock (locker) { 44 var pluginIds = new List<Guid>(); 45 Dictionary<IPluginDescription, byte[]> checksumsNeededPlugins = CalcChecksumsForPlugins(neededPlugins); 42 var pluginIds = new List<Guid>(); 43 Dictionary<IPluginDescription, byte[]> checksumsNeededPlugins = CalcChecksumsForPlugins(neededPlugins); 46 44 47 foreach (var neededPlugin in checksumsNeededPlugins) { 48 Plugin foundPlugin = alreadyUploadedPlugins.FirstOrDefault(p => p.Hash.SequenceEqual(neededPlugin.Value)); 45 foreach (var neededPlugin in checksumsNeededPlugins) { 46 Plugin foundPlugin = alreadyUploadedPlugins.FirstOrDefault(p => p.Hash.SequenceEqual(neededPlugin.Value)); 47 if (foundPlugin == null) { 48 foundPlugin = onlinePlugins.FirstOrDefault(p => { 49 if (p.Hash != null) { 50 return p.Hash.SequenceEqual(neededPlugin.Value); 51 } else { 52 return false; 53 } 54 }); 55 49 56 if (foundPlugin == null) { 50 foundPlugin = onlinePlugins.FirstOrDefault(p => { 51 if (p.Hash != null) { 52 return p.Hash.SequenceEqual(neededPlugin.Value); 53 } else { 54 return false; 55 } 56 }); 57 58 if (foundPlugin == null) { 59 Plugin p = CreatePlugin(neededPlugin.Key, neededPlugin.Value); 60 List<PluginData> pd = CreatePluginDatas(neededPlugin.Key); 61 try { 62 p.Id = service.AddPlugin(p, pd); 63 alreadyUploadedPlugins.Add(p); 64 pluginIds.Add(p.Id); 65 } 66 catch (FaultException<PluginAlreadyExistsFault> fault) { 67 onlinePlugins.Add(service.GetPlugin(fault.Detail.Id)); 68 } 69 } else { 70 pluginIds.Add(foundPlugin.Id); 57 Plugin p = CreatePlugin(neededPlugin.Key, neededPlugin.Value); 58 List<PluginData> pd = CreatePluginDatas(neededPlugin.Key); 59 try { 60 p.Id = service.AddPlugin(p, pd); 61 alreadyUploadedPlugins.Add(p); 62 pluginIds.Add(p.Id); 63 } 64 catch (FaultException<PluginAlreadyExistsFault> fault) { 65 onlinePlugins.Add(service.GetPlugin(fault.Detail.Id)); 71 66 } 72 67 } else { 73 68 pluginIds.Add(foundPlugin.Id); 74 69 } 70 } else { 71 pluginIds.Add(foundPlugin.Id); 75 72 } 76 return pluginIds;77 73 } 74 return pluginIds; 78 75 } 79 76 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.HiveEngine/3.4/HiveEngine.cs
r6444 r6452 94 94 #region constructors and cloning 95 95 public HiveEngine() { 96 ResourceNames = "HEAL";97 Priority = 0;96 this.ResourceNames = "HEAL"; 97 this.Priority = 0; 98 98 this.log = new ThreadSafeLog(this.log); 99 99 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj
r6369 r6452 94 94 </ItemGroup> 95 95 <ItemGroup> 96 <Compile Include="ApplicationConstants.cs" />97 96 <Compile Include="DataTransfer\SlaveStatistics.cs" /> 98 97 <Compile Include="DataTransfer\Statistics.cs" /> 99 98 <Compile Include="DataTransfer\UserStatistics.cs" /> 99 <Compile Include="ITransactionManager.cs" /> 100 100 <Compile Include="ServiceFaults\PluginAlreadyExistsFault.cs" /> 101 <Compile Include="Settings.Designer.cs"> 102 <AutoGen>True</AutoGen> 103 <DesignTimeSharedInput>True</DesignTimeSharedInput> 104 <DependentUpon>Settings.settings</DependentUpon> 105 </Compile> 106 <None Include="app.config" /> 101 107 <None Include="HeuristicLabServicesHiveCommonPlugin.cs.frame" /> 102 <Compile Include="DataTransfer\ Appointment.cs" />108 <Compile Include="DataTransfer\Downtime.cs" /> 103 109 <Compile Include="DataTransfer\Command.cs" /> 104 110 <Compile Include="DataTransfer\HiveExperimentPermission.cs" /> … … 125 131 <None Include="Properties\AssemblyInfo.cs.frame" /> 126 132 <Compile Include="ServiceContracts\IHiveService.cs" /> 133 <None Include="Settings.settings"> 134 <Generator>PublicSettingsSingleFileGenerator</Generator> 135 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 136 </None> 127 137 </ItemGroup> 128 138 <ItemGroup> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/ServiceContracts/IHiveService.cs
r6431 r6452 127 127 Plugin GetPlugin(Guid pluginId); 128 128 [OperationContract] 129 Plugin GetPluginByHash(byte[] hash); 130 [OperationContract] 129 131 [FaultContract(typeof(PluginAlreadyExistsFault))] 130 132 Guid AddPlugin(Plugin plugin, List<PluginData> pluginData); … … 133 135 [OperationContract] 134 136 IEnumerable<PluginData> GetPluginDatas(List<Guid> pluginIds); 137 [OperationContract] 138 void DeletePlugin(Guid pluginId); 135 139 #endregion 136 140 … … 182 186 #endregion 183 187 184 #region AppointmentMethods185 [OperationContract] 186 Guid Add Appointment(Appointment appointment);187 188 [OperationContract] 189 void Delete Appointment(Guid appointmentId);190 191 [OperationContract] 192 void Update Appointment(Appointment appointment);193 194 [OperationContract] 195 IEnumerable< Appointment> GetScheduleForResource(Guid resourceId);188 #region Downtime Methods 189 [OperationContract] 190 Guid AddDowntime(Downtime downtime); 191 192 [OperationContract] 193 void DeleteDowntime(Guid downtimeId); 194 195 [OperationContract] 196 void UpdateDowntime(Downtime downtime); 197 198 [OperationContract] 199 IEnumerable<Downtime> GetDowntimesForResource(Guid resourceId); 196 200 #endregion 197 201 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Convert.cs
r6426 r6452 113 113 #endregion 114 114 115 #region Appointment116 public static DT. Appointment ToDto(UptimeCalendarsource) {117 if (source == null) return null; 118 return new DT. Appointment { Id = source.UptimeCalendarId, AllDayEvent = source.AllDayEvent, EndDate = source.EndDate, Recurring = source.Recurring, RecurringId = source.RecurringId, ResourceId = source.ResourceId, StartDate = source.StartDate };119 } 120 public static UptimeCalendar ToEntity(DT.Appointmentsource) {121 if (source == null) return null; 122 var entity = new UptimeCalendar(); ToEntity(source, entity);123 return entity; 124 } 125 public static void ToEntity(DT. Appointment source, UptimeCalendartarget) {126 if ((source != null) && (target != null)) { 127 target. UptimeCalendarId = source.Id; target.AllDayEvent = source.AllDayEvent; target.EndDate = source.EndDate; target.Recurring = source.Recurring; target.RecurringId = source.RecurringId; target.ResourceId = source.ResourceId; target.StartDate = source.StartDate;115 #region Downtimes 116 public static DT.Downtime ToDto(Downtime source) { 117 if (source == null) return null; 118 return new DT.Downtime { Id = source.DowntimeId, AllDayEvent = source.AllDayEvent, EndDate = source.EndDate, Recurring = source.Recurring, RecurringId = source.RecurringId, ResourceId = source.ResourceId, StartDate = source.StartDate }; 119 } 120 public static Downtime ToEntity(DT.Downtime source) { 121 if (source == null) return null; 122 var entity = new Downtime(); ToEntity(source, entity); 123 return entity; 124 } 125 public static void ToEntity(DT.Downtime source, Downtime target) { 126 if ((source != null) && (target != null)) { 127 target.DowntimeId = source.Id; target.AllDayEvent = source.AllDayEvent; target.EndDate = source.EndDate; target.Recurring = source.Recurring; target.RecurringId = source.RecurringId; target.ResourceId = source.ResourceId; target.StartDate = source.StartDate; 128 128 } 129 129 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HeuristicLab.Services.Hive.DataAccess-3.4.csproj
r6431 r6452 109 109 <Compile Include="Properties\AssemblyInfo.cs" /> 110 110 <None Include="Properties\AssemblyInfo.cs.frame" /> 111 <Compile Include=" Properties\Settings.Designer.cs">111 <Compile Include="Settings.Designer.cs"> 112 112 <AutoGen>True</AutoGen> 113 113 <DesignTimeSharedInput>True</DesignTimeSharedInput> … … 130 130 <SubType>Designer</SubType> 131 131 </None> 132 <None Include=" Properties\Settings.settings">132 <None Include="Settings.settings"> 133 133 <Generator>SettingsSingleFileGenerator</Generator> 134 134 <LastGenOutput>Settings.Designer.cs</LastGenOutput> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDao.cs
r6431 r6452 24 24 using System.Linq; 25 25 using System.Linq.Expressions; 26 using HeuristicLab.Services.Hive.Common;27 26 using HeuristicLab.Services.Hive.Common.DataTransfer; 28 using HeuristicLab.Services.Hive.DataAccess.Properties;29 27 using DT = HeuristicLab.Services.Hive.Common.DataTransfer; 30 28 … … 33 31 public static HiveDataContext CreateContext(bool longRunning = false) { 34 32 var context = new HiveDataContext(Settings.Default.HeuristicLab_Hive_LinqConnectionString); 35 if (longRunning) context.CommandTimeout = (int) ApplicationConstants.LongRunningDatabaseCommandTimeout.TotalSeconds;33 if (longRunning) context.CommandTimeout = (int)Settings.Default.LongRunningDatabaseCommandTimeout.TotalSeconds; 36 34 return context; 37 35 } … … 109 107 where child.ParentJobId == ar.Job.JobId 110 108 select child).Count() > 0 111 orderby ar.Job.Priority , db.Random() descending109 orderby ar.Job.Priority descending, db.Random() 112 110 select Convert.ToDto(ar.Job); 113 111 return count == 0 ? query.ToArray() : query.Take(count).ToArray(); … … 127 125 && ar.Job.CoresNeeded <= slave.FreeCores 128 126 && ar.Job.MemoryNeeded <= slave.FreeMemory 129 orderby ar.Job.Priority , db.Random() descending// take random job to avoid the race condition that occurs when this method is called concurrently (the same job would be returned)127 orderby ar.Job.Priority descending, db.Random() // take random job to avoid the race condition that occurs when this method is called concurrently (the same job would be returned) 130 128 select Convert.ToDto(ar.Job); 131 129 var waitingJobs = (count == 0 ? query : query.Take(count)).ToArray(); … … 634 632 #endregion 635 633 636 #region AppointmentMethods637 public Appointment GetAppointment(Guid id) {638 using (var db = CreateContext()) { 639 return Convert.ToDto(db. UptimeCalendars.SingleOrDefault(x => x.UptimeCalendarId == id));640 } 641 } 642 643 public IEnumerable< Appointment> GetAppointments(Expression<Func<UptimeCalendar, bool>> predicate) {644 using (var db = CreateContext()) { 645 return db. UptimeCalendars.Where(predicate).Select(x => Convert.ToDto(x)).ToArray();646 } 647 } 648 649 public Guid Add Appointment(Appointmentdto) {650 using (var db = CreateContext()) { 651 var entity = Convert.ToEntity(dto); 652 db. UptimeCalendars.InsertOnSubmit(entity);653 db.SubmitChanges(); 654 return entity. UptimeCalendarId;655 } 656 } 657 658 public void Update Appointment(Appointmentdto) {659 using (var db = CreateContext()) { 660 var entity = db. UptimeCalendars.FirstOrDefault(x => x.UptimeCalendarId == dto.Id);661 if (entity == null) db. UptimeCalendars.InsertOnSubmit(Convert.ToEntity(dto));662 else Convert.ToEntity(dto, entity); 663 db.SubmitChanges(); 664 } 665 } 666 667 public void Delete Appointment(Guid id) {668 using (var db = CreateContext()) { 669 var entity = db. UptimeCalendars.FirstOrDefault(x => x.UptimeCalendarId == id);670 if (entity != null) db. UptimeCalendars.DeleteOnSubmit(entity);634 #region Downtime Methods 635 public DT.Downtime GetDowntime(Guid id) { 636 using (var db = CreateContext()) { 637 return Convert.ToDto(db.Downtimes.SingleOrDefault(x => x.DowntimeId == id)); 638 } 639 } 640 641 public IEnumerable<DT.Downtime> GetDowntimes(Expression<Func<Downtime, bool>> predicate) { 642 using (var db = CreateContext()) { 643 return db.Downtimes.Where(predicate).Select(x => Convert.ToDto(x)).ToArray(); 644 } 645 } 646 647 public Guid AddDowntime(DT.Downtime dto) { 648 using (var db = CreateContext()) { 649 var entity = Convert.ToEntity(dto); 650 db.Downtimes.InsertOnSubmit(entity); 651 db.SubmitChanges(); 652 return entity.DowntimeId; 653 } 654 } 655 656 public void UpdateDowntime(DT.Downtime dto) { 657 using (var db = CreateContext()) { 658 var entity = db.Downtimes.FirstOrDefault(x => x.DowntimeId == dto.Id); 659 if (entity == null) db.Downtimes.InsertOnSubmit(Convert.ToEntity(dto)); 660 else Convert.ToEntity(dto, entity); 661 db.SubmitChanges(); 662 } 663 } 664 665 public void DeleteDowntime(Guid id) { 666 using (var db = CreateContext()) { 667 var entity = db.Downtimes.FirstOrDefault(x => x.DowntimeId == id); 668 if (entity != null) db.Downtimes.DeleteOnSubmit(entity); 671 669 db.SubmitChanges(); 672 670 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml
r6431 r6452 1 1 <?xml version="1.0" encoding="utf-8"?><Database Name="HeuristicLab.Hive" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007"> 2 <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Hive.DataAccess.Properties.Settings" SettingsPropertyName="HeuristicLab_Hive_LinqConnectionString" Provider="System.Data.SqlClient" /> 2 3 <Table Name="dbo.AssignedResources" Member="AssignedResources"> 3 4 <Type Name="AssignedResource"> … … 38 39 <Association Name="Resource_AssignedResource" Member="AssignedResources" ThisKey="ResourceId" OtherKey="ResourceId" Type="AssignedResource" /> 39 40 <Association Name="Resource_Resource" Member="ChildResources" ThisKey="ResourceId" OtherKey="ParentResourceId" Type="Resource" /> 40 <Association Name="Resource_ UptimeCalendar" Member="UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="UptimeCalendar" />41 <Association Name="Resource_Downtime" Member="Downtimes" Storage="_UptimeCalendars" ThisKey="ResourceId" OtherKey="ResourceId" Type="Downtime" /> 41 42 <Association Name="Resource_StateLog" Member="StateLogs" ThisKey="ResourceId" OtherKey="SlaveId" Type="StateLog" /> 42 43 <Association Name="Resource_Resource" Member="ParentResource" ThisKey="ParentResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" /> … … 82 83 </Type> 83 84 </Table> 84 <Table Name="dbo. UptimeCalendar" Member="UptimeCalendars">85 <Type Name=" UptimeCalendar">86 <Column Name=" UptimeCalendarId" Type="System.Guid" DbType="UniqueIdentifier" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" />85 <Table Name="dbo.Downtime" Member="Downtimes"> 86 <Type Name="Downtime"> 87 <Column Name="DowntimeId" Storage="_UptimeCalendarId" Type="System.Guid" DbType="UniqueIdentifier" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 87 88 <Column Name="ResourceId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 88 89 <Column Name="StartDate" Type="System.DateTime" DbType="DateTime" CanBeNull="false" /> … … 91 92 <Column Name="Recurring" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 92 93 <Column Name="RecurringId" Type="System.Guid" DbType="UniqueIdentifier" CanBeNull="false" /> 93 <Association Name="Resource_ UptimeCalendar" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" />94 <Association Name="Resource_Downtime" Member="Resource" ThisKey="ResourceId" OtherKey="ResourceId" Type="Resource" IsForeignKey="true" DeleteRule="CASCADE" /> 94 95 </Type> 95 96 </Table> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.dbml.layout
r6431 r6452 34 34 </classShape> 35 35 <classShape Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" absoluteBounds="13.5, 2.5, 2, 2.1554996744791666"> 36 <DataClassMoniker Name="/HiveDataContext/ UptimeCalendar" />36 <DataClassMoniker Name="/HiveDataContext/Downtime" /> 37 37 <nestedChildShapes> 38 38 <elementListCompartment Id="7d8f121b-35bb-4753-a25f-3fac1562e68e" absoluteBounds="13.515, 2.9600000000000009, 1.9700000000000002, 1.5954996744791665" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" /> … … 69 69 </nodes> 70 70 </inheritanceConnector> 71 <associationConnector edgePoints="[(1 1.9843735 : 2.57859537760417); (11.9843735 : 4.69314697265625); (10.875 : 4.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed">71 <associationConnector edgePoints="[(12.25 : 2.57859537760417); (12.25 : 4.69314697265625); (10.875 : 4.69314697265625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 72 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 73 73 <nodes> … … 97 97 </nodes> 98 98 </associationConnector> 99 <associationConnector edgePoints="[(12.781252 : 2.57859537760417); (12.781252 : 3.54212367513021); (13.5 : 3.54212367513021)]" fixedFrom="NotFixed" fixedTo="NotFixed">100 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_UptimeCalendar" />101 <nodes>102 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" />103 <classShapeMoniker Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" />104 </nodes>105 </associationConnector>106 99 <classShape Id="6bc13f26-f9a8-4597-b054-35be34190d12" absoluteBounds="4.125, 1, 2, 1.3862939453125"> 107 100 <DataClassMoniker Name="/HiveDataContext/JobData" /> … … 228 221 </nodes> 229 222 </associationConnector> 223 <associationConnector edgePoints="[(12.781252 : 2.57859537760417); (12.781252 : 3.64829952604167); (13.5 : 3.64829952604167)]" fixedFrom="Algorithm" fixedTo="Algorithm"> 224 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_Downtime" /> 225 <nodes> 226 <classShapeMoniker Id="706a4581-6daf-4e71-ae2a-87d50b27a051" /> 227 <classShapeMoniker Id="8d5712f7-7a1a-4a89-bd4d-fd60200d3306" /> 228 </nodes> 229 </associationConnector> 230 230 </nestedChildShapes> 231 231 </ordesignerObjectsDiagram> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/HiveDataContext.designer.cs
r6431 r6452 12 12 namespace HeuristicLab.Services.Hive.DataAccess 13 13 { 14 using System.Data.Linq; 15 using System.Data.Linq.Mapping; 16 using System.Data; 17 using System.Collections.Generic; 18 using System.Reflection; 19 using System.Linq; 20 using System.Linq.Expressions; 21 using System.ComponentModel; 22 using System; 14 using System; 15 using System.ComponentModel; 16 using System.Data.Linq; 17 using System.Data.Linq.Mapping; 23 18 24 19 … … 46 41 partial void UpdateJob(Job instance); 47 42 partial void DeleteJob(Job instance); 48 partial void Insert UptimeCalendar(UptimeCalendarinstance);49 partial void Update UptimeCalendar(UptimeCalendarinstance);50 partial void Delete UptimeCalendar(UptimeCalendarinstance);43 partial void InsertDowntime(Downtime instance); 44 partial void UpdateDowntime(Downtime instance); 45 partial void DeleteDowntime(Downtime instance); 51 46 partial void InsertHiveExperiment(HiveExperiment instance); 52 47 partial void UpdateHiveExperiment(HiveExperiment instance); … … 81 76 #endregion 82 77 78 public HiveDataContext() : 79 base(global::HeuristicLab.Services.Hive.DataAccess.Settings.Default.HeuristicLab_Hive_LinqConnectionString, mappingSource) 80 { 81 OnCreated(); 82 } 83 83 84 public HiveDataContext(string connection) : 84 85 base(connection, mappingSource) … … 145 146 } 146 147 147 public System.Data.Linq.Table< UptimeCalendar> UptimeCalendars148 { 149 get 150 { 151 return this.GetTable< UptimeCalendar>();148 public System.Data.Linq.Table<Downtime> Downtimes 149 { 150 get 151 { 152 return this.GetTable<Downtime>(); 152 153 } 153 154 } … … 877 878 private EntitySet<Resource> _ChildResources; 878 879 879 private EntitySet< UptimeCalendar> _UptimeCalendars;880 private EntitySet<Downtime> _UptimeCalendars; 880 881 881 882 private EntitySet<StateLog> _StateLogs; … … 901 902 this._AssignedResources = new EntitySet<AssignedResource>(new Action<AssignedResource>(this.attach_AssignedResources), new Action<AssignedResource>(this.detach_AssignedResources)); 902 903 this._ChildResources = new EntitySet<Resource>(new Action<Resource>(this.attach_ChildResources), new Action<Resource>(this.detach_ChildResources)); 903 this._UptimeCalendars = new EntitySet< UptimeCalendar>(new Action<UptimeCalendar>(this.attach_UptimeCalendars), new Action<UptimeCalendar>(this.detach_UptimeCalendars));904 this._UptimeCalendars = new EntitySet<Downtime>(new Action<Downtime>(this.attach_UptimeCalendars), new Action<Downtime>(this.detach_UptimeCalendars)); 904 905 this._StateLogs = new EntitySet<StateLog>(new Action<StateLog>(this.attach_StateLogs), new Action<StateLog>(this.detach_StateLogs)); 905 906 this._ParentResource = default(EntityRef<Resource>); … … 1017 1018 } 1018 1019 1019 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ UptimeCalendar", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")]1020 public EntitySet< UptimeCalendar> UptimeCalendars1020 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_UptimeCalendars", ThisKey="ResourceId", OtherKey="ResourceId")] 1021 public EntitySet<Downtime> Downtimes 1021 1022 { 1022 1023 get … … 1121 1122 } 1122 1123 1123 private void attach_UptimeCalendars( UptimeCalendarentity)1124 private void attach_UptimeCalendars(Downtime entity) 1124 1125 { 1125 1126 this.SendPropertyChanging(); … … 1127 1128 } 1128 1129 1129 private void detach_UptimeCalendars( UptimeCalendarentity)1130 private void detach_UptimeCalendars(Downtime entity) 1130 1131 { 1131 1132 this.SendPropertyChanging(); … … 2040 2041 } 2041 2042 2042 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo. UptimeCalendar")]2043 public partial class UptimeCalendar: INotifyPropertyChanging, INotifyPropertyChanged2043 [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Downtime")] 2044 public partial class Downtime : INotifyPropertyChanging, INotifyPropertyChanged 2044 2045 { 2045 2046 … … 2066 2067 partial void OnValidate(System.Data.Linq.ChangeAction action); 2067 2068 partial void OnCreated(); 2068 partial void On UptimeCalendarIdChanging(System.Guid value);2069 partial void On UptimeCalendarIdChanged();2069 partial void OnDowntimeIdChanging(System.Guid value); 2070 partial void OnDowntimeIdChanged(); 2070 2071 partial void OnResourceIdChanging(System.Guid value); 2071 2072 partial void OnResourceIdChanged(); … … 2082 2083 #endregion 2083 2084 2084 public UptimeCalendar()2085 public Downtime() 2085 2086 { 2086 2087 this._Resource = default(EntityRef<Resource>); … … 2089 2090 2090 2091 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UptimeCalendarId", AutoSync=AutoSync.OnInsert, DbType="UniqueIdentifier", IsPrimaryKey=true, IsDbGenerated=true)] 2091 public System.Guid UptimeCalendarId2092 public System.Guid DowntimeId 2092 2093 { 2093 2094 get … … 2099 2100 if ((this._UptimeCalendarId != value)) 2100 2101 { 2101 this.On UptimeCalendarIdChanging(value);2102 this.OnDowntimeIdChanging(value); 2102 2103 this.SendPropertyChanging(); 2103 2104 this._UptimeCalendarId = value; 2104 this.SendPropertyChanged(" UptimeCalendarId");2105 this.On UptimeCalendarIdChanged();2105 this.SendPropertyChanged("DowntimeId"); 2106 this.OnDowntimeIdChanged(); 2106 2107 } 2107 2108 } … … 2232 2233 } 2233 2234 2234 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_ UptimeCalendar", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")]2235 [global::System.Data.Linq.Mapping.AssociationAttribute(Name="Resource_Downtime", Storage="_Resource", ThisKey="ResourceId", OtherKey="ResourceId", IsForeignKey=true, DeleteRule="CASCADE")] 2235 2236 public Resource Resource 2236 2237 { … … 2249 2250 { 2250 2251 this._Resource.Entity = null; 2251 previousValue. UptimeCalendars.Remove(this);2252 previousValue.Downtimes.Remove(this); 2252 2253 } 2253 2254 this._Resource.Entity = value; 2254 2255 if ((value != null)) 2255 2256 { 2256 value. UptimeCalendars.Add(this);2257 value.Downtimes.Add(this); 2257 2258 this._ResourceId = value.ResourceId; 2258 2259 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Interfaces/IHiveDao.cs
r6431 r6452 129 129 #endregion 130 130 131 #region AppointmentMethods132 DT. Appointment GetAppointment(Guid id);133 IEnumerable<DT. Appointment> GetAppointments(Expression<Func<UptimeCalendar, bool>> predicate);134 Guid Add Appointment(DT.Appointmentdto);135 void Update Appointment(DT.Appointmentdto);136 void Delete Appointment(Guid id);131 #region Downtime Methods 132 DT.Downtime GetDowntime(Guid id); 133 IEnumerable<DT.Downtime> GetDowntimes(Expression<Func<Downtime, bool>> predicate); 134 Guid AddDowntime(DT.Downtime dto); 135 void UpdateDowntime(DT.Downtime dto); 136 void DeleteDowntime(Guid id); 137 137 #endregion 138 138 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/Tools/Prepare Hive Database.sql
r6431 r6452 73 73 ALTER TABLE dbo.Resource WITH NOCHECK ADD CONSTRAINT [DF_Resource_ResourceId] DEFAULT (NEWSEQUENTIALID()) FOR ResourceId; 74 74 75 ALTER TABLE dbo. UptimeCalendar ALTER COLUMN UptimeCalendarId ADD ROWGUIDCOL;76 ALTER TABLE dbo. UptimeCalendar WITH NOCHECK ADD CONSTRAINT [DF_UptimeCalendar_UptimeCalendarId] DEFAULT (NEWSEQUENTIALID()) FOR UptimeCalendarId;75 ALTER TABLE dbo.Downtime ALTER COLUMN DowntimeId ADD ROWGUIDCOL; 76 ALTER TABLE dbo.Downtime WITH NOCHECK ADD CONSTRAINT [DF_Downtime_DowntimeId] DEFAULT (NEWSEQUENTIALID()) FOR DowntimeId; 77 77 78 78 ALTER TABLE dbo.HiveExperiment ALTER COLUMN HiveExperimentId ADD ROWGUIDCOL; -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs
r6444 r6452 24 24 using HeuristicLab.Services.Hive.Common; 25 25 26 namespace HeuristicLab.Services.Hive.DataAccess { 27 public static class TransactionManager {28 public staticvoid UseTransaction(Action call, bool serializable = false, bool longRunning = false) {26 namespace HeuristicLab.Services.Hive.DataAccess { 27 public class TransactionManager : ITransactionManager { 28 public void UseTransaction(Action call, bool serializable = false, bool longRunning = false) { 29 29 int n = 10; 30 30 while (n > 0) { … … 46 46 } 47 47 48 public staticT UseTransaction<T>(Func<T> call, bool serializable = false, bool longRunning = false) {48 public T UseTransaction<T>(Func<T> call, bool serializable = false, bool longRunning = false) { 49 49 int n = 10; 50 50 while (n > 0) { … … 68 68 } 69 69 70 private staticTransactionScope CreateTransaction(bool serializable, bool longRunning) {70 private TransactionScope CreateTransaction(bool serializable, bool longRunning) { 71 71 var options = new TransactionOptions(); 72 72 if (serializable) … … 76 76 77 77 if (longRunning) 78 options.Timeout = ApplicationConstants.LongRunningDatabaseCommandTimeout;78 options.Timeout = Settings.Default.LongRunningDatabaseCommandTimeout; 79 79 80 80 return new TransactionScope(TransactionScopeOption.Required, options); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/app.config
r5264 r6452 2 2 <configuration> 3 3 <configSections> 4 <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 5 <section name="HeuristicLab.Services.Hive.DataAccess.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 6 </sectionGroup> 4 7 </configSections> 5 8 <connectionStrings> 6 <add name="HeuristicLab.Services.Hive.DataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;" providerName="System.Data.SqlClient"/> 9 <add name="HeuristicLab.Services.Hive.DataAccess.Properties.Settings.HeuristicLab_Hive_LinqConnectionString" 10 connectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.4;Integrated Security=True;" 11 providerName="System.Data.SqlClient" /> 7 12 </connectionStrings> 8 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup></configuration> 13 <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/></startup><applicationSettings> 14 <HeuristicLab.Services.Hive.DataAccess.Settings> 15 <setting name="LongRunningDatabaseCommandTimeout" serializeAs="String"> 16 <value>00:05:00</value> 17 </setting> 18 </HeuristicLab.Services.Hive.DataAccess.Settings> 19 </applicationSettings> 20 </configuration> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/DaoTests.cs
r6431 r6452 70 70 plugin1.UserId = Guid.Empty; 71 71 plugin1.DateCreated = DateTime.Now; 72 plugin1.Hash = new byte[] { 1, 2, 3 }; 72 73 73 74 DT.PluginData pluginData1 = new DT.PluginData(); … … 135 136 Assert.AreEqual(null, dao.GetJobData(job1.Id)); 136 137 Assert.AreEqual(null, dao.GetHiveExperiment(he.Id)); 138 139 dao.DeletePlugin(plugin1.Id); 140 Assert.AreEqual(null, dao.GetPlugin(plugin1.Id)); 137 141 } 138 142 … … 177 181 plugin1.Version = new Version("1.0.0.0"); 178 182 plugin1.UserId = Guid.Empty; 183 plugin1.Hash = new byte[] { 1, 2, 3 }; 179 184 180 185 plugin1.Id = dao.AddPlugin(plugin1); … … 186 191 Assert.AreEqual(plugin1.UserId, plugin1loaded.UserId); 187 192 Assert.AreEqual(plugin1.DateCreated.ToString(), plugin1loaded.DateCreated.ToString()); 193 Assert.IsTrue(plugin1.Hash.SequenceEqual(plugin1loaded.Hash)); 188 194 189 195 DT.PluginData pluginData1 = new DT.PluginData(); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockLifecycleManager.cs
r6372 r6452 20 20 #endregion 21 21 22 23 22 namespace HeuristicLab.Services.Hive.Tests.Mocks { 24 23 public class MockLifecycleManager : ILifecycleManager { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/Mocks/MockServiceLocator.cs
r6431 r6452 44 44 45 45 public ILifecycleManager LifecycleManager { 46 get { 47 return defaultServiceLocator.LifecycleManager; 48 } 46 get { return defaultServiceLocator.LifecycleManager; } 47 } 48 public ITransactionManager TransactionManager { 49 get { return defaultServiceLocator.TransactionManager; } 49 50 } 50 51 51 52 public HeartbeatManager HeartbeatManager { 52 get { 53 return defaultServiceLocator.HeartbeatManager; 54 } 53 get { return defaultServiceLocator.HeartbeatManager; } 55 54 } 56 57 55 } 58 56 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Tests/ServiceTests.cs
r6431 r6452 66 66 }; 67 67 68 // delete plugin first (otherwise the system would not allow it because of the same hash code 69 var hash = new byte[] { 1, 2, 3 }; 70 var p = service.GetPluginByHash(hash); 71 if (p != null) service.DeletePlugin(p.Id); 72 68 73 // create plugin 69 74 DT.Plugin plugin1 = new DT.Plugin(); … … 72 77 plugin1.UserId = Guid.Empty; 73 78 plugin1.DateCreated = DateTime.Now; 74 79 plugin1.Hash = hash; 80 75 81 DT.PluginData pluginData1 = new DT.PluginData(); 76 82 pluginData1.FileName = "Tests.MyPlugin-1.0.dll"; … … 167 173 Assert.AreEqual(job.Id, actions[0].JobId); 168 174 169 // create appointmentwhich should make slave unavailable for calculation170 Guid appointmentId = service.AddAppointment(new Appointment{ ResourceId = slave.Id, StartDate = DateTime.Now - TimeSpan.FromMinutes(1), EndDate = DateTime.Now + TimeSpan.FromMinutes(1), Recurring = false });175 // create downtime which should make slave unavailable for calculation 176 Guid downtimeId = service.AddDowntime(new Downtime { ResourceId = slave.Id, StartDate = DateTime.Now - TimeSpan.FromMinutes(1), EndDate = DateTime.Now + TimeSpan.FromMinutes(1), Recurring = false }); 171 177 172 178 progress.Clear(); … … 177 183 Assert.AreEqual(Guid.Empty, actions[0].JobId); 178 184 179 service.Delete Appointment(appointmentId);185 service.DeleteDowntime(downtimeId); 180 186 181 187 // delete -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Web/Hive-3.4/Web.config
r6369 r6452 2 2 <configuration> 3 3 4 <configSections> 5 <sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" > 6 <section name="HeuristicLab.Services.Hive.DataAccess.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 7 <section name="HeuristicLab.Services.Hive.Common.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" /> 8 </sectionGroup> 9 </configSections> 10 11 <applicationSettings> 12 <HeuristicLab.Services.Hive.DataAccess.Settings> 13 <!-- Timeout for long running database command (storing or loading jobData) --> 14 <setting name="LongRunningDatabaseCommandTimeout" serializeAs="String"> 15 <value>00:05:33</value> 16 </setting> 17 </HeuristicLab.Services.Hive.DataAccess.Settings> 18 19 <HeuristicLab.Services.Hive.Common.Settings> 20 <!-- If a slave does not send a heartbeat for this time, it is set offline which means all of its jobs are rescheduled --> 21 <setting name="SlaveHeartbeatTimeout" serializeAs="String"> 22 <value>00:01:00</value> 23 </setting> 24 25 <!-- When a job is in state `Calculating` this is the maximum time it does not have to send heartbeats, otherwise its rescheduled --> 26 <setting name="CalculatingJobHeartbeatTimeout" serializeAs="String"> 27 <value>00:05:30</value> 28 </setting> 29 30 <!-- When a job is in state `Transferring` this is the maximum time it does not have to send heartbeats, otherwise its rescheduled --> 31 <setting name="TransferringJobHeartbeatTimeout" serializeAs="String"> 32 <value>00:05:30</value> 33 </setting> 34 </HeuristicLab.Services.Hive.Common.Settings> 35 </applicationSettings> 36 4 37 <connectionStrings> 5 38 <add name="HeuristicLab.Authentication" connectionString="data source=localhost;Integrated Security=SSPI;Initial Catalog=HeuristicLab.Authentication"/> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HeartbeatManager.cs
r6444 r6452 142 142 143 143 private bool SlaveIsAllowedToCalculate(Guid slaveId) { 144 // appointment==doNotCompute! the slave may only calculate if there is no appointmentright now. this needs to be checked for every parent resource also145 return dao.GetParentResources(slaveId).All(r => dao.Get Appointments(x => x.ResourceId == r.Id && (DateTime.Now >= x.StartDate) && (DateTime.Now <= x.EndDate)).Count() == 0);144 // the slave may only calculate if there is no downtime right now. this needs to be checked for every parent resource also 145 return dao.GetParentResources(slaveId).All(r => dao.GetDowntimes(x => x.ResourceId == r.Id && (DateTime.Now >= x.StartDate) && (DateTime.Now <= x.EndDate)).Count() == 0); 146 146 } 147 147 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/HiveService.cs
r6431 r6452 27 27 using HeuristicLab.Services.Hive.Common.DataTransfer; 28 28 using HeuristicLab.Services.Hive.Common.ServiceContracts; 29 using DA = HeuristicLab.Services.Hive.DataAccess;30 29 31 30 namespace HeuristicLab.Services.Hive { … … 45 44 private IAuthorizationManager author { 46 45 get { return ServiceLocator.Instance.AuthorizationManager; } 46 } 47 private ITransactionManager trans { 48 get { return ServiceLocator.Instance.TransactionManager; } 47 49 } 48 50 private ILifecycleManager lifecycleManager { … … 56 58 public Guid AddJob(Job job, JobData jobData, IEnumerable<Guid> resourceIds) { 57 59 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 58 return DA.TransactionManager.UseTransaction(() => {60 return trans.UseTransaction(() => { 59 61 job.Id = dao.AddJob(job); 60 62 jobData.JobId = job.Id; … … 71 73 public Guid AddChildJob(Guid parentJobId, Job job, JobData jobData) { 72 74 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 73 return DA.TransactionManager.UseTransaction(() => {75 return trans.UseTransaction(() => { 74 76 job.ParentJobId = parentJobId; 75 77 return AddJob(job, jobData, dao.GetAssignedResources(parentJobId).Select(x => x.Id)); … … 109 111 public void UpdateJob(Job job) { 110 112 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 111 DA.TransactionManager.UseTransaction(() => {113 trans.UseTransaction(() => { 112 114 dao.UpdateJob(job); 113 115 }); … … 116 118 public void UpdateJobData(Job job, JobData jobData) { 117 119 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 118 // DA.TransactionManager.UseTransaction(() => { // cneumuel: try without transaction120 //trans.UseTransaction(() => { // cneumuel: try without transaction 119 121 jobData.LastUpdate = DateTime.Now; 120 122 dao.UpdateJob(job); … … 125 127 public void DeleteJob(Guid jobId) { 126 128 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 127 DA.TransactionManager.UseTransaction(() => {129 trans.UseTransaction(() => { 128 130 dao.DeleteJob(jobId); 129 131 }); … … 132 134 public void DeleteChildJobs(Guid parentJobId) { 133 135 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 134 DA.TransactionManager.UseTransaction(() => {136 trans.UseTransaction(() => { 135 137 var jobs = GetChildJobs(parentJobId, true, false); 136 138 foreach (var job in jobs) { … … 143 145 public Job UpdateJobState(Guid jobId, JobState jobState, Guid? slaveId, Guid? userId, string exception) { 144 146 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 145 return DA.TransactionManager.UseTransaction(() => {147 return trans.UseTransaction(() => { 146 148 Job job = dao.UpdateJobState(jobId, jobState, slaveId, userId, exception); 147 149 … … 161 163 }); 162 164 } 165 166 public IEnumerable<Job> GetJobsByResourceId(Guid resourceId) { 167 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 168 return trans.UseTransaction(() => dao.GetJobsByResourceId(resourceId)); 169 } 163 170 #endregion 164 171 … … 166 173 public void StopJob(Guid jobId) { 167 174 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 168 DA.TransactionManager.UseTransaction(() => {175 trans.UseTransaction(() => { 169 176 var job = dao.GetJob(jobId); 170 177 if (job.State == JobState.Calculating || job.State == JobState.Transferring) { … … 181 188 public void PauseJob(Guid jobId) { 182 189 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 183 DA.TransactionManager.UseTransaction(() => {190 trans.UseTransaction(() => { 184 191 var job = dao.GetJob(jobId); 185 192 if (job.State == JobState.Calculating || job.State == JobState.Transferring) { … … 194 201 public void RestartJob(Guid jobId) { 195 202 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 196 DA.TransactionManager.UseTransaction(() => {203 trans.UseTransaction(() => { 197 204 Job job = dao.UpdateJobState(jobId, JobState.Waiting, null, author.UserId, string.Empty); 198 205 job.Command = null; … … 223 230 public Guid AddHiveExperiment(HiveExperiment hiveExperimentDto) { 224 231 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 225 return DA.TransactionManager.UseTransaction(() => {232 return trans.UseTransaction(() => { 226 233 hiveExperimentDto.OwnerUserId = author.UserId; 227 234 hiveExperimentDto.DateCreated = DateTime.Now; … … 232 239 public void UpdateHiveExperiment(HiveExperiment hiveExperimentDto) { 233 240 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 234 DA.TransactionManager.UseTransaction(() => {241 trans.UseTransaction(() => { 235 242 dao.UpdateHiveExperiment(hiveExperimentDto); 236 243 }); … … 239 246 public void DeleteHiveExperiment(Guid hiveExperimentId) { 240 247 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 241 DA.TransactionManager.UseTransaction(() => {248 trans.UseTransaction(() => { 242 249 HiveExperiment he = dao.GetHiveExperiment(hiveExperimentId); 243 250 dao.DeleteHiveExperiment(hiveExperimentId); // child jobs will be deleted by db-trigger … … 249 256 public void Hello(Slave slaveInfo) { 250 257 authen.AuthenticateForAnyRole(HiveRoles.Slave); 251 DA.TransactionManager.UseTransaction(() => {258 trans.UseTransaction(() => { 252 259 var slave = dao.GetSlave(slaveInfo.Id); 253 260 … … 280 287 public void GoodBye(Guid slaveId) { 281 288 authen.AuthenticateForAnyRole(HiveRoles.Slave); 282 DA.TransactionManager.UseTransaction(() => {289 trans.UseTransaction(() => { 283 290 var slave = dao.GetSlave(slaveId); 284 291 if (slave != null) { … … 294 301 authen.AuthenticateForAnyRole(HiveRoles.Slave); 295 302 TriggerLifecycle(false); 296 return DA.TransactionManager.UseTransaction(() => heartbeatManager.ProcessHeartbeat(heartbeat));303 return trans.UseTransaction(() => heartbeatManager.ProcessHeartbeat(heartbeat)); 297 304 } 298 305 #endregion … … 301 308 public Guid AddPlugin(Plugin plugin, List<PluginData> pluginDatas) { 302 309 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 303 return DA.TransactionManager.UseTransaction(() => {310 return trans.UseTransaction(() => { 304 311 plugin.UserId = author.UserId; 305 312 plugin.DateCreated = DateTime.Now; … … 325 332 } 326 333 334 public Plugin GetPluginByHash(byte[] hash) { 335 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 336 return dao.GetPlugins(x => x.Hash == hash).FirstOrDefault(); 337 } 338 327 339 public IEnumerable<Plugin> GetPlugins() { 328 340 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); … … 334 346 List<PluginData> pluginDatas = new List<PluginData>(); 335 347 336 return DA.TransactionManager.UseTransaction(() => {348 return trans.UseTransaction(() => { 337 349 foreach (Guid guid in pluginIds) { 338 350 pluginDatas.AddRange(dao.GetPluginDatas(x => x.PluginId == guid).ToList()); … … 342 354 } 343 355 356 public void DeletePlugin(Guid pluginId) { 357 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client, HiveRoles.Slave); 358 dao.DeletePlugin(pluginId); 359 } 344 360 #endregion 345 361 … … 347 363 public Guid AddSlave(Slave slave) { 348 364 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 349 return DA.TransactionManager.UseTransaction(() => dao.AddSlave(slave));365 return trans.UseTransaction(() => dao.AddSlave(slave)); 350 366 } 351 367 352 368 public Guid AddSlaveGroup(SlaveGroup slaveGroup) { 353 369 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 354 return DA.TransactionManager.UseTransaction(() => dao.AddSlaveGroup(slaveGroup));370 return trans.UseTransaction(() => dao.AddSlaveGroup(slaveGroup)); 355 371 } 356 372 … … 377 393 public void UpdateSlave(Slave slave) { 378 394 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 379 DA.TransactionManager.UseTransaction(() => {395 trans.UseTransaction(() => { 380 396 dao.UpdateSlave(slave); 381 397 }); … … 384 400 public void UpdateSlaveGroup(SlaveGroup slaveGroup) { 385 401 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 386 DA.TransactionManager.UseTransaction(() => {402 trans.UseTransaction(() => { 387 403 dao.UpdateSlaveGroup(slaveGroup); 388 404 }); … … 391 407 public void DeleteSlave(Guid slaveId) { 392 408 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 393 DA.TransactionManager.UseTransaction(() => {409 trans.UseTransaction(() => { 394 410 dao.DeleteSlave(slaveId); 395 411 }); … … 398 414 public void DeleteSlaveGroup(Guid slaveGroupId) { 399 415 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 400 DA.TransactionManager.UseTransaction(() => {416 trans.UseTransaction(() => { 401 417 dao.DeleteSlaveGroup(slaveGroupId); 402 418 }); … … 405 421 public void AddResourceToGroup(Guid slaveGroupId, Guid resourceId) { 406 422 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 407 DA.TransactionManager.UseTransaction(() => {423 trans.UseTransaction(() => { 408 424 var resource = dao.GetResource(resourceId); 409 425 resource.ParentResourceId = slaveGroupId; … … 414 430 public void RemoveResourceFromGroup(Guid slaveGroupId, Guid resourceId) { 415 431 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 416 DA.TransactionManager.UseTransaction(() => {432 trans.UseTransaction(() => { 417 433 var resource = dao.GetResource(resourceId); 418 434 resource.ParentResourceId = null; … … 423 439 public Guid GetResourceId(string resourceName) { 424 440 authen.AuthenticateForAnyRole(HiveRoles.Administrator, HiveRoles.Client); 425 return DA.TransactionManager.UseTransaction(() => {441 return trans.UseTransaction(() => { 426 442 var resource = dao.GetResources(x => x.Name == resourceName).FirstOrDefault(); 427 443 if (resource != null) { … … 435 451 public void TriggerLifecycle(bool force) { 436 452 // use a serializable transaction here to ensure not two threads execute this simultaniously (mutex-lock would not work since IIS may use multiple AppDomains) 437 DA.TransactionManager.UseTransaction(() => {453 trans.UseTransaction(() => { 438 454 DateTime lastCleanup = dao.GetLastCleanup(); 439 455 if (force || DateTime.Now - lastCleanup > TimeSpan.FromSeconds(59)) { … … 462 478 #endregion 463 479 464 #region AppointmentMethods465 public Guid Add Appointment(Appointment appointment) {480 #region Downtime Methods 481 public Guid AddDowntime(Downtime downtime) { 466 482 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 467 return DA.TransactionManager.UseTransaction(() => dao.AddAppointment(appointment));468 } 469 470 public void Delete Appointment(Guid appointmentId) {483 return trans.UseTransaction(() => dao.AddDowntime(downtime)); 484 } 485 486 public void DeleteDowntime(Guid downtimeId) { 471 487 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 472 DA.TransactionManager.UseTransaction(() => {473 dao.Delete Appointment(appointmentId);474 }); 475 } 476 477 public void Update Appointment(Appointment appointment) {488 trans.UseTransaction(() => { 489 dao.DeleteDowntime(downtimeId); 490 }); 491 } 492 493 public void UpdateDowntime(Downtime downtime) { 478 494 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 479 DA.TransactionManager.UseTransaction(() => {480 dao.Update Appointment(appointment);481 }); 482 } 483 484 public IEnumerable< Appointment> GetScheduleForResource(Guid resourceId) {495 trans.UseTransaction(() => { 496 dao.UpdateDowntime(downtime); 497 }); 498 } 499 500 public IEnumerable<Downtime> GetDowntimesForResource(Guid resourceId) { 485 501 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 486 return DA.TransactionManager.UseTransaction(() => dao.GetAppointments(x => x.ResourceId == resourceId)); 487 } 488 489 public IEnumerable<Job> GetJobsByResourceId(Guid resourceId) { 490 authen.AuthenticateForAnyRole(HiveRoles.Administrator); 491 return DA.TransactionManager.UseTransaction(() => dao.GetJobsByResourceId(resourceId)); 502 return trans.UseTransaction(() => dao.GetDowntimes(x => x.ResourceId == resourceId)); 492 503 } 493 504 #endregion -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/Interfaces/IServiceLocator.cs
r6431 r6452 28 28 IHiveDao HiveDao { get; } 29 29 ILifecycleManager LifecycleManager { get; } 30 ITransactionManager TransactionManager { get; } 30 31 HeartbeatManager HeartbeatManager { get; } 31 32 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/LifecycleManager.cs
r6431 r6452 76 76 var slaves = dao.GetSlaves(x => x.SlaveState != SlaveState.Offline); 77 77 foreach (Slave slave in slaves) { 78 if (!slave.LastHeartbeat.HasValue || (DateTime.Now - slave.LastHeartbeat.Value) > ApplicationConstants.SlaveHeartbeatTimeout) {78 if (!slave.LastHeartbeat.HasValue || (DateTime.Now - slave.LastHeartbeat.Value) > Settings.Default.SlaveHeartbeatTimeout) { 79 79 slave.SlaveState = SlaveState.Offline; 80 80 SetJobsWaiting(slave.Id); … … 107 107 /// </summary> 108 108 private void SetTimeoutJobsWaiting() { 109 var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.CalculatingJobHeartbeatTimeout)110 || (x.State == JobState.Transferring && (DateTime.Now - x.LastHeartbeat) > ApplicationConstants.TransferringJobHeartbeatTimeout));109 var jobs = dao.GetJobs(x => (x.State == JobState.Calculating && (DateTime.Now - x.LastHeartbeat) > Settings.Default.CalculatingJobHeartbeatTimeout) 110 || (x.State == JobState.Transferring && (DateTime.Now - x.LastHeartbeat) > Settings.Default.TransferringJobHeartbeatTimeout)); 111 111 foreach (var j in jobs) { 112 112 Job job = dao.UpdateJobState(j.Id, JobState.Waiting, null, null, "Slave timed out."); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive/3.4/ServiceLocator.cs
r6431 r6452 66 66 } 67 67 68 private ITransactionManager transactionManager; 69 public ITransactionManager TransactionManager { 70 get { 71 if (transactionManager == null) transactionManager = new TransactionManager(); 72 return transactionManager; 73 } 74 } 75 68 76 private HeartbeatManager heartbeatManager; 69 77 public HeartbeatManager HeartbeatManager {
Note: See TracChangeset
for help on using the changeset viewer.