Changeset 4133
- Timestamp:
- 08/02/10 17:27:24 (14 years ago)
- Location:
- branches/3.3-HiveMigration/sources/HeuristicLab.Hive
- Files:
-
- 3 added
- 2 deleted
- 60 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Calendar/3.3/Properties/AssemblyInfo.cs
r4121 r4133 57 57 // by using the '*' as shown below: 58 58 // [assembly: AssemblyVersion("1.0.*")] 59 [assembly: AssemblyVersion("3.3.0.41 11")]60 [assembly: AssemblyFileVersion("3.3.0.41 11")]61 [assembly: AssemblyBuildDate("2010/0 7/30 12:22:35")]59 [assembly: AssemblyVersion("3.3.0.4121")] 60 [assembly: AssemblyFileVersion("3.3.0.4121")] 61 [assembly: AssemblyBuildDate("2010/08/02 14:50:20")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.DataAccess.ADOHelper/3.3/HeuristicLab.DataAccess.ADOHelper-3.3.csproj
r4121 r4133 118 118 </ItemGroup> 119 119 <ItemGroup> 120 <Reference Include="HeuristicLab.Common-3.3"> 121 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 122 </Reference> 123 <Reference Include="HeuristicLab.Persistence-3.3"> 124 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath> 125 </Reference> 120 126 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 121 127 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.DataAccess.ADOHelper/3.3/ManyToManyRelation.cs
r1656 r4133 4 4 using System.Text; 5 5 using HeuristicLab.DataAccess.Interfaces; 6 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 7 7 8 namespace HeuristicLab.DataAccess.ADOHelper { 9 [StorableClass] 8 10 public class ManyToManyRelation: PersistableObject { 11 [Storable] 9 12 public Guid Id2 { get; set; } 13 [Storable] 14 public IList<object> AdditionalAttributes { get; set; } 10 15 11 public IList<object> AdditionalAttributes { get; set; } 16 public ManyToManyRelation() {} 17 18 public ManyToManyRelation(bool deserializing) : base(deserializing) { } 19 20 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 21 ManyToManyRelation clone = (ManyToManyRelation) base.Clone(cloner); 22 clone.Id2 = this.Id2; 23 clone.AdditionalAttributes = new List<object>(this.AdditionalAttributes); 24 return clone; 25 } 12 26 } 13 27 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.DataAccess/3.3/HeuristicLab.DataAccess-3.3.csproj
r4121 r4133 157 157 </ItemGroup> 158 158 <ItemGroup> 159 <Reference Include="HeuristicLab.Common-3.3"> 160 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 161 </Reference> 162 <Reference Include="HeuristicLab.Persistence-3.3"> 163 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath> 164 </Reference> 159 165 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 160 166 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.DataAccess/3.3/PersistableObject.cs
r2606 r4133 25 25 using System.Runtime.Serialization; 26 26 using HeuristicLab.DataAccess.Interfaces; 27 using HeuristicLab.Common; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 28 30 namespace HeuristicLab.DataAccess { 31 [StorableClass] 29 32 [DataContract] 30 33 [Serializable] 31 public class PersistableObject: IPersistableObject { 34 public class PersistableObject: IPersistableObject, IDeepCloneable { 35 36 public PersistableObject() { } 37 38 public PersistableObject(bool deserializing) { } 39 40 [Storable] 32 41 [DataMember] 33 42 public Guid Id { get; set; } … … 48 57 return this.Id.GetHashCode(); 49 58 } 59 60 public virtual IDeepCloneable Clone(Cloner cloner) { 61 PersistableObject clone = (PersistableObject)Activator.CreateInstance(this.GetType(), true); 62 cloner.RegisterClonedObject(this, clone); 63 clone.Id = this.Id; 64 return clone; 65 } 66 67 public object Clone() { 68 return Clone(new Cloner()); 69 } 50 70 } 51 71 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln
r4121 r4133 27 27 {5010BD86-23B7-4F8C-888A-76D21AD5266A} = {5010BD86-23B7-4F8C-888A-76D21AD5266A} 28 28 {4F15BEA2-F494-4584-A0E5-6BA85377B313} = {4F15BEA2-F494-4584-A0E5-6BA85377B313} 29 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}30 29 {C8FEDAC1-0326-4293-B585-F0FEDDEDFC11} = {C8FEDAC1-0326-4293-B585-F0FEDDEDFC11} 31 30 {FD1AFEC2-7A79-45CF-9365-5195B04A2C9F} = {FD1AFEC2-7A79-45CF-9365-5195B04A2C9F} … … 89 88 EndProject 90 89 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab", "HeuristicLab", "{BD1DE6F6-A188-4D1F-9681-BA7104818370}" 91 EndProject92 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.ExtLibs", "HeuristicLab.ExtLibs", "{98B4B360-4F14-4BC5-92F2-9B81F6C712DA}"93 EndProject94 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.SpringNET-1.3.0", "HeuristicLab.ExtLibs\HeuristicLab.SpringNET\1.3.0\HeuristicLab.SpringNET-1.3.0.csproj", "{48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}"95 90 EndProject 96 91 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.Hive.Test", "HeuristicLab.Hive.Test", "{4F2D8149-D608-42B3-BB1C-6909BDA2B350}" … … 437 432 {21187322-52DD-4243-80A4-A85F0263E63B}.Release|x86.ActiveCfg = Release|x86 438 433 {21187322-52DD-4243-80A4-A85F0263E63B}.Release|x86.Build.0 = Release|x86 439 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU440 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.Build.0 = Debug|Any CPU441 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86442 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.Build.0 = Debug|x86443 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.ActiveCfg = Debug|x64444 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.Build.0 = Debug|x64445 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x86.ActiveCfg = Debug|x86446 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x86.Build.0 = Debug|x86447 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.ActiveCfg = Release|Any CPU448 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.Build.0 = Release|Any CPU449 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.ActiveCfg = Release|x86450 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.Build.0 = Release|x86451 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.ActiveCfg = Release|x64452 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.Build.0 = Release|x64453 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.ActiveCfg = Release|x86454 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.Build.0 = Release|x86455 434 {55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.ActiveCfg = Debug|x86 456 435 {55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.Build.0 = Debug|x86 … … 551 530 {5CDACE54-5FB2-4344-A21C-963F63CB7C2B} = {BD1DE6F6-A188-4D1F-9681-BA7104818370} 552 531 {D17A4D6A-4CAA-4470-8A19-F42463C021FD} = {BD1DE6F6-A188-4D1F-9681-BA7104818370} 553 {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {98B4B360-4F14-4BC5-92F2-9B81F6C712DA}554 532 {55B89815-F3E7-4D09-9442-273F849141DD} = {4F2D8149-D608-42B3-BB1C-6909BDA2B350} 555 533 EndGlobalSection -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj
r4121 r4133 76 76 </PropertyGroup> 77 77 <ItemGroup> 78 <Reference Include="HeuristicLab.Common-3.3"> 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 80 </Reference> 78 81 <Reference Include="HeuristicLab.Core-3.3"> 79 82 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> 80 83 </Reference> 81 <Reference Include="HeuristicLab.DataAccess-3.3, Version=3.3.0.4091, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />82 84 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 83 85 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> … … 149 151 </ItemGroup> 150 152 <ItemGroup> 153 <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj"> 154 <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project> 155 <Name>HeuristicLab.DataAccess-3.3</Name> 156 </ProjectReference> 151 157 <ProjectReference Include="..\..\HeuristicLab.Hive.Client.Common\3.3\HeuristicLab.Hive.Client.Common-3.3.csproj"> 152 158 <Project>{89F4BC52-C174-481E-9BD2-3814171020E8}</Project> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/HeuristicLab.Hive.Client.Core-3.3.csproj
r4121 r4133 76 76 </PropertyGroup> 77 77 <ItemGroup> 78 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 78 <Reference Include="HeuristicLab.Common-3.3"> 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 80 </Reference> 81 <Reference Include="HeuristicLab.Core-3.3" /> 79 82 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 80 83 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Core/3.3/Properties/AssemblyInfo.cs
r4121 r4133 57 57 // by using the '*' as shown below: 58 58 // [assembly: AssemblyVersion("1.0.*")] 59 [assembly: AssemblyVersion("3.3.0.412 0")]60 [assembly: AssemblyFileVersion("3.3.0.412 0")]61 [assembly: AssemblyBuildDate("2010/0 7/30 13:39:23")]59 [assembly: AssemblyVersion("3.3.0.4121")] 60 [assembly: AssemblyFileVersion("3.3.0.4121")] 61 [assembly: AssemblyBuildDate("2010/08/02 17:23:56")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.ExecutionEngine/3.3/HeuristicLab.Hive.Client.ExecutionEngine-3.3.csproj
r4121 r4133 79 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 80 80 </Reference> 81 <Reference Include="HeuristicLab.Core-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />81 <Reference Include="HeuristicLab.Core-3.3" /> 82 82 <Reference Include="HeuristicLab.Persistence-3.3"> 83 83 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/AppointmentDto.cs
r3022 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.DataAccess; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 9 10 11 [StorableClass] 10 12 [DataContract] 11 13 public class AppointmentDto: PersistableObject { 14 [Storable] 12 15 [DataMember] 13 16 public DateTime StartDate { get; set; } 17 [Storable] 14 18 [DataMember] 15 19 public DateTime EndDate { get; set; } 20 [Storable] 16 21 [DataMember] 17 22 public bool AllDayEvent { get; set; } 23 [Storable] 18 24 [DataMember] 19 25 public bool Recurring { get; set; } 26 [Storable] 20 27 [DataMember] 21 28 public Guid RecurringId { get; set; } 29 [Storable] 22 30 [DataMember] 23 31 public Guid ResourceId { get; set; } 32 33 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 34 AppointmentDto clone = (AppointmentDto)base.Clone(cloner); 35 clone.AllDayEvent = this.AllDayEvent; 36 clone.EndDate = this.EndDate; 37 clone.Recurring = this.Recurring; 38 clone.RecurringId = this.RecurringId; 39 clone.ResourceId = this.ResourceId; 40 clone.StartDate = this.StartDate; 41 return clone; 42 } 24 43 } 25 44 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/CachedHivePluginInfoDto.cs
r4042 r4133 23 23 using System.Collections.Generic; 24 24 using System.Text; 25 using System.Linq; 25 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 26 27 using System.Runtime.Serialization; 27 28 using HeuristicLab.PluginInfrastructure.Manager; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.PluginInfrastructure { 32 [StorableClass] 30 33 [DataContract] 31 34 [Serializable] … … 35 38 /// stores the plugin files in a list of byte arrays 36 39 /// </summary> 40 [Storable] 37 41 [DataMember] 38 42 public List<HivePluginFile> PluginFiles { get; set; } … … 41 45 PluginFiles = new List<HivePluginFile>(); 42 46 } 47 48 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 49 CachedHivePluginInfoDto clone = (CachedHivePluginInfoDto) base.Clone(cloner); 50 clone.PluginFiles = (from p in this.PluginFiles 51 select (HivePluginFile)cloner.Clone(p)).ToList(); 52 return clone; 53 } 43 54 } 44 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientConfigDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Common; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 32 [StorableClass] 31 33 [DataContract] 32 34 [Serializable] 33 public class ClientConfigDto : PersistableObject { 35 public class ClientConfigDto : PersistableObject, IDeepCloneable { 36 [Storable] 34 37 [DataMember] 35 38 public String UpDownTimeCalendar { get; set; } 39 [Storable] 36 40 [DataMember] 37 41 public int? HeartBeatIntervall { get; set; } 42 43 public override IDeepCloneable Clone(Cloner cloner) { 44 ClientConfigDto clone = (ClientConfigDto)base.Clone(cloner); 45 clone.UpDownTimeCalendar = this.UpDownTimeCalendar; 46 clone.HeartBeatIntervall = this.HeartBeatIntervall; 47 return clone; 48 } 38 49 } 39 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs
r4116 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Common; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { … … 31 33 public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch }; 32 34 35 [StorableClass] 33 36 [DataContract] 34 37 [Serializable] 35 38 public class ClientDto : ResourceDto { 39 [Storable] 36 40 [DataMember] 37 41 public int NrOfCores { get; set; } 42 [Storable] 38 43 [DataMember] 39 44 public int NrOfFreeCores { get; set; } 45 [Storable] 40 46 [DataMember] 41 47 public int? CpuSpeedPerCore { get; set; } 48 [Storable] 42 49 [DataMember] 43 50 public int Memory { get; set; } 51 [Storable] 44 52 [DataMember] 45 53 public int FreeMemory { get; set; } 54 [Storable] 46 55 [DataMember] 47 56 public DateTime? Login { get; set; } 57 [Storable] 48 58 [DataMember] 49 59 public State State { get; set; } 60 [Storable] 50 61 [DataMember] 51 62 public CalendarState CalendarSyncStatus { get; set; } 63 [Storable] 52 64 [DataMember] 53 65 public ClientConfigDto Config { get; set; } … … 56 68 return base.ToString() + ", NrOfCores: " + NrOfCores + ", NrOfFreeCores " + NrOfFreeCores + ", Login: " + Login + ", State: " + State; 57 69 } 70 71 public override IDeepCloneable Clone(Cloner cloner) { 72 ClientDto clone = (ClientDto)base.Clone(cloner); 73 clone.CalendarSyncStatus = this.CalendarSyncStatus; 74 clone.Config = (ClientConfigDto)cloner.Clone(this.Config); 75 clone.CpuSpeedPerCore = this.CpuSpeedPerCore; 76 clone.FreeMemory = this.FreeMemory; 77 clone.Login = this.Login; 78 clone.Memory = this.Memory; 79 clone.NrOfCores = this.NrOfCores; 80 clone.NrOfFreeCores = this.NrOfFreeCores; 81 clone.State = this.State; 82 return clone; 83 } 58 84 } 59 85 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientGroupDto.cs
r3011 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 28 29 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 29 30 31 [StorableClass] 30 32 [DataContract] 31 33 public class ClientGroupDto : ResourceDto { 34 [Storable] 32 35 [DataMember] 33 36 public List<ResourceDto> Resources { get; set; } … … 36 39 Resources = new List<ResourceDto>(); 37 40 } 41 42 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 43 ClientGroupDto clone = (ClientGroupDto) base.Clone(cloner); 44 clone.Resources = (from r in this.Resources 45 select (ResourceDto)cloner.Clone(r)).ToList(); 46 return clone; 47 } 38 48 } 39 49 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginFile.cs
r4042 r4133 4 4 using System.Text; 5 5 using System.Runtime.Serialization; 6 using HeuristicLab.Common; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 8 7 9 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 10 [StorableClass] 8 11 [Serializable] 9 12 [DataContract] 10 public class HivePluginFile { 13 public class HivePluginFile : IDeepCloneable { 14 [Storable] 11 15 [DataMember] 12 16 public byte[] BinaryFile { get; set; } 17 [Storable] 13 18 [DataMember] 14 19 public String Name { get; set; } … … 18 23 Name = name; 19 24 } 25 26 public virtual IDeepCloneable Clone(Cloner cloner) { 27 HivePluginFile clone = (HivePluginFile)Activator.CreateInstance(this.GetType(), true); 28 cloner.RegisterClonedObject(this, clone); 29 clone.Name = this.Name; 30 if (this.BinaryFile != null) { 31 clone.BinaryFile = new byte[this.BinaryFile.Length]; 32 Array.Copy(this.BinaryFile, clone.BinaryFile, this.BinaryFile.Length); 33 } 34 return clone; 35 } 36 37 public object Clone() { 38 return Clone(new Cloner()); 39 } 20 40 } 21 41 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs
r4119 r4133 27 27 using HeuristicLab.DataAccess; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 30 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 32 [StorableClass] 32 33 [DataContract] 33 34 [Serializable] 34 35 public class HivePluginInfoDto : PersistableObject { 36 [Storable] 35 37 [DataMember] 36 38 public String Name { get; set; } … … 39 41 public Version Version { get; set; } 40 42 43 // helper-variable to be able to persist version 44 [Storable] 45 private string storableVersion; 46 47 public HivePluginInfoDto() { } 48 49 public HivePluginInfoDto(bool deserializing) : base(deserializing) { } 50 51 [StorableHook(HookType.BeforeSerialization)] 52 private void BeforeSerialization() { 53 this.storableVersion = Version.ToString(); 54 } 55 56 [StorableHook(HookType.AfterDeserialization)] 57 private void AfterDeserialization() { 58 int[] parts = this.storableVersion.Split('.').Select(s => int.Parse(s)).ToArray(); 59 this.Version = new Version(parts[0], parts[1], parts[2], parts[3]); 60 } 61 62 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 63 HivePluginInfoDto clone = (HivePluginInfoDto) base.Clone(cloner); 64 clone.Name = this.Name; 65 clone.Version = (Version)this.Version.Clone(); 66 return clone; 67 } 41 68 } 42 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs
r3578 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Common; 27 28 using HeuristicLab.DataAccess; 28 29 using HeuristicLab.PluginInfrastructure; 30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 31 30 32 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 33 34 [StorableClass] 32 35 [DataContract] 33 36 [Serializable] 34 37 public class JobDto : PersistableObject { 38 [Storable] 35 39 [DataMember] 36 40 public State State { get; set; } 41 [Storable] 37 42 [DataMember] 38 43 public Guid UserId { get; set; } 44 [Storable] 39 45 [DataMember] 40 46 public ClientDto Client { get; set; } 47 [Storable] 41 48 [DataMember] 42 49 public JobDto ParentJob { get; set; } 50 [Storable] 43 51 [DataMember] 44 52 public double? Percentage { get; set; } 53 [Storable] 45 54 [DataMember] 46 55 public DateTime? DateCreated { get; set; } 56 [Storable] 47 57 [DataMember] 48 58 public DateTime? DateCalculated { get; set; } 59 [Storable] 49 60 [DataMember] 50 61 public DateTime? DateFinished { get; set; } 62 [Storable] 51 63 [DataMember] 52 64 public int Priority { get; set; } 65 [Storable] 53 66 [DataMember] 54 67 public int CoresNeeded { get; set; } 68 [Storable] 55 69 [DataMember] 56 70 public int MemoryNeeded { get; set; } 71 [Storable] 57 72 [DataMember] 58 73 public List<HivePluginInfoDto> PluginsNeeded { get; set; } 74 [Storable] 59 75 [DataMember] 60 76 public List<Guid> AssignedResourceIds { get; set; } 77 [Storable] 61 78 [DataMember] 62 79 public ProjectDto Project { get; set; } … … 71 88 AssignedResourceIds = new List<Guid>(); 72 89 } 90 91 public override IDeepCloneable Clone(Cloner cloner) { 92 JobDto clone = (JobDto)base.Clone(cloner); 93 clone.Id = this.Id; 94 clone.AssignedResourceIds = new List<Guid>(this.AssignedResourceIds); 95 clone.Client = (ClientDto)cloner.Clone(this.Client); 96 clone.CoresNeeded = this.CoresNeeded; 97 clone.DateCalculated = this.DateCalculated; 98 clone.DateCreated = this.DateCreated; 99 clone.DateFinished = this.DateFinished; 100 clone.Id = this.Id; 101 clone.MemoryNeeded = this.MemoryNeeded; 102 clone.ParentJob = (JobDto)cloner.Clone(this.ParentJob); 103 clone.Percentage = this.Percentage; 104 clone.PluginsNeeded = (from p in this.PluginsNeeded 105 select (HivePluginInfoDto)cloner.Clone(p)).ToList(); 106 clone.Priority = this.Priority; 107 clone.Project = (ProjectDto)cloner.Clone(this.Project); 108 clone.State = this.State; 109 clone.UserId = this.UserId; 110 return clone; 111 } 73 112 } 74 113 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs
r2099 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 31 32 // [chn] Where are those JobResults used? would it make sense to use it instead of JobDto for querying Job-Status? Probably yes 33 // ask gradinger 34 [StorableClass] 31 35 [DataContract] 32 36 [Serializable] 33 37 public class JobResult : PersistableObject { 38 [Storable] 34 39 [DataMember] 35 40 public Guid JobId { get; set; } 41 [Storable] 36 42 [DataMember] 37 43 public double Percentage { get; set; } 44 [Storable] 38 45 [DataMember] 39 46 public DateTime Timestamp { get; set; } 47 [Storable] 40 48 [DataMember] 41 49 public Guid ClientId { get; set; } 50 [Storable] 42 51 [DataMember] 43 52 public Exception Exception { get; set; } 53 [Storable] 44 54 [DataMember] 45 55 public DateTime DateFinished { get; set; } 56 57 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 58 JobResult clone = (JobResult) base.Clone(cloner); 59 clone.ClientId = this.ClientId; 60 clone.DateFinished = this.DateFinished; 61 throw new NotImplementedException("Exception kann nicht serialisiert werden, deshalb irgendwie wrappen... oder nur message (+stacktrace, ...?) speichern"); 62 clone.Exception = this.Exception; 63 clone.JobId = this.JobId; 64 clone.Percentage = this.Percentage; 65 clone.Timestamp = this.Timestamp; 66 return clone; 67 } 46 68 } 47 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ProjectDto.cs
r3011 r4133 27 27 using HeuristicLab.DataAccess; 28 28 using HeuristicLab.PluginInfrastructure; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 30 30 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 32 [StorableClass] 32 33 [DataContract] 33 34 [Serializable] 34 35 public class ProjectDto : PersistableObject { 36 [Storable] 35 37 [DataMember] 36 38 public String Name { get; set; } 39 40 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 41 ProjectDto clone = (ProjectDto) base.Clone(cloner); 42 clone.Name = this.Name; 43 return clone; 44 } 37 45 } 38 46 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ResourceDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Common; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 30 29 31 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 32 [StorableClass] 31 33 [DataContract] 32 34 [Serializable] 33 public class ResourceDto : PersistableObject { 35 public class ResourceDto : PersistableObject, IDeepCloneable { 36 [Storable] 34 37 [DataMember] 35 38 public string Name { get; set; } … … 38 41 return Id + " " + Name; 39 42 } 43 44 public virtual IDeepCloneable Clone(Cloner cloner) { 45 ResourceDto clone = (ResourceDto)base.Clone(cloner); 46 clone.Name = this.Name; 47 return clone; 48 } 40 49 } 41 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJob.cs
r3011 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 [StorableClass] 29 32 [DataContract] 30 33 [Serializable] 31 public class SerializedJob { 34 public class SerializedJob : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public JobDto JobInfo { get; set; } 34 38 [Storable] 35 39 [DataMember] 36 40 public byte[] SerializedJobData { get; set; } 41 42 public virtual IDeepCloneable Clone(Cloner cloner) { 43 SerializedJob clone = (SerializedJob)Activator.CreateInstance(this.GetType(), true); 44 cloner.RegisterClonedObject(this, clone); 45 clone.JobInfo = (JobDto)cloner.Clone(this.JobInfo); 46 clone.SerializedJobData = new byte[this.SerializedJobData.Length]; 47 Array.Copy(this.SerializedJobData, clone.SerializedJobData, this.SerializedJobData.Length); 48 return clone; 49 } 50 51 public object Clone() { 52 return Clone(new Cloner()); 53 } 37 54 } 38 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJobResult.cs
r2099 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 31 [StorableClass] 29 32 [DataContract] 30 33 [Serializable] 31 public class SerializedJobResult { 34 public class SerializedJobResult : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public JobResult JobResult { get; set; } 34 38 [Storable] 35 39 [DataMember] 36 40 public byte[] SerializedJobResultData { get; set; } 41 42 public virtual IDeepCloneable Clone(Cloner cloner) { 43 SerializedJobResult clone = (SerializedJobResult)Activator.CreateInstance(this.GetType(), true); 44 cloner.RegisterClonedObject(this, clone); 45 clone.JobResult = (JobResult)cloner.Clone(this.JobResult); 46 clone.SerializedJobResultData = new byte[this.SerializedJobResultData.Length]; 47 Array.Copy(this.SerializedJobResultData, clone.SerializedJobResultData, this.SerializedJobResultData.Length); 48 return clone; 49 } 50 51 public object Clone() { 52 return Clone(new Cloner()); 53 } 37 54 } 38 55 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/UpTimeStatisticsDto.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.DataAccess; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts.BusinessObjects { 30 31 32 [StorableClass] 31 33 [DataContract] 32 34 public class UpTimeStatisticsDto : PersistableObject { 35 [Storable] 33 36 [DataMember] 34 37 public ClientDto Client { get; set; } 38 [Storable] 35 39 [DataMember] 36 40 public DateTime Login { get; set; } 41 [Storable] 37 42 [DataMember] 38 43 public DateTime Logout { get; set; } 39 44 45 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 46 UpTimeStatisticsDto clone = (UpTimeStatisticsDto) base.Clone(cloner); 47 clone.Client = (ClientDto)cloner.Clone(this.Client); 48 clone.Login = this.Login; 49 clone.Logout = this.Logout; 50 return clone; 51 } 40 52 } 41 53 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj
r4121 r4133 76 76 </PropertyGroup> 77 77 <ItemGroup> 78 <Reference Include="HeuristicLab.Collections-3.3"> 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> 80 </Reference> 81 <Reference Include="HeuristicLab.Common-3.3"> 82 <HintPath>..\..\HeuristicLab.Hive.JobBase\3.3\bin\Debug\HeuristicLab.Common-3.3.dll</HintPath> 83 </Reference> 84 <Reference Include="HeuristicLab.Core-3.3"> 85 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> 86 </Reference> 87 <Reference Include="HeuristicLab.Persistence-3.3"> 88 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Persistence-3.3.dll</HintPath> 89 </Reference> 78 90 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 79 91 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> … … 119 131 <Compile Include="BusinessObjects\ClientDto.cs" /> 120 132 <Compile Include="BusinessObjects\ClientConfigDto.cs" /> 133 <Compile Include="BusinessObjects\ClientGroupDtoList.cs" /> 121 134 <Compile Include="RecurrentEvent.cs" /> 122 135 <Compile Include="ResponseCalendar.cs" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientManager.cs
r3203 r4133 41 41 ResponseList<ClientGroupDto> GetAllClientGroups(); 42 42 [OperationContract] 43 ResponseObject< List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId);43 ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId); 44 44 [OperationContract] 45 45 ResponseObject<ClientGroupDto> AddClientGroup(ClientGroupDto clientGroup); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainer.cs
r3203 r4133 24 24 using System.Linq; 25 25 using System.Text; 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Common; 26 28 27 29 namespace HeuristicLab.Hive.Contracts { … … 30 32 /// the actual message itself and the JobId, refered by the message 31 33 /// </summary> 34 [StorableClass] 32 35 [Serializable] 33 public class MessageContainer {36 public class MessageContainer : IDeepCloneable { 34 37 35 38 public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown, JobFailed, UptimeLimitDisconnect, … … 37 40 }; 38 41 42 [Storable] 39 43 public MessageType Message { get; set; } 44 [Storable] 40 45 public Guid JobId { get; set; } 41 46 … … 44 49 JobId = Guid.Empty; 45 50 } 51 46 52 public MessageContainer(MessageType message, Guid jobId) { 47 53 Message = message; … … 49 55 } 50 56 57 public virtual IDeepCloneable Clone(Cloner cloner) { 58 MessageContainer clone = (MessageContainer)Activator.CreateInstance(this.GetType(), true); 59 cloner.RegisterClonedObject(this, clone); 60 //clone.StatusMessage = this.StatusMessage; 61 //clone.Success = this.Success; 62 return clone; 63 } 64 65 public object Clone() { 66 return Clone(new Cloner()); 67 } 51 68 } 52 69 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Response.cs
r1939 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts { … … 30 32 /// Server response class 31 33 /// </summary> 34 [StorableClass] 32 35 [DataContract] 33 36 [Serializable] 34 public class Response { 37 public class Response : IDeepCloneable { 38 [Storable] 35 39 [DataMember] 36 40 public bool Success { get; set; } 41 [Storable] 37 42 [DataMember] 38 public string StatusMessage { get; set; } 43 public string StatusMessage { get; set; } 44 45 public virtual IDeepCloneable Clone(Cloner cloner) { 46 Response clone = (Response)Activator.CreateInstance(this.GetType(), true); 47 cloner.RegisterClonedObject(this, clone); 48 clone.StatusMessage = this.StatusMessage; 49 clone.Success = this.Success; 50 return clone; 51 } 52 53 public object Clone() { 54 return Clone(new Cloner()); 55 } 39 56 } 40 57 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseCalendar.cs
r3203 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.Hive.Contracts.BusinessObjects; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts { 9 public class ResponseCalendar: Response { 10 [StorableClass] 11 public class ResponseCalendar : Response { 12 [Storable] 10 13 [DataMember] 11 14 public bool ForceFetch { get; set; } 15 [Storable] 12 16 [DataMember] 13 17 public IEnumerable<AppointmentDto> Appointments { get; set; } 18 19 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 20 ResponseCalendar clone = (ResponseCalendar) base.Clone(cloner); 21 clone.Appointments = (from a in this.Appointments 22 select (AppointmentDto)cloner.Clone(a)).ToList(); 23 clone.ForceFetch = this.ForceFetch; 24 return clone; 25 } 14 26 } 15 27 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseHB.cs
r1530 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 28 28 29 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// Return value to hearbeats sent by the client 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 public class ResponseHB : Response { 39 [Storable] 37 40 [DataMember] 38 41 public List<MessageContainer> ActionRequest { get; set; } 42 43 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 44 ResponseHB clone = (ResponseHB) base.Clone(cloner); 45 clone.ActionRequest = (from ar in this.ActionRequest 46 select (MessageContainer) cloner.Clone(ar)).ToList(); 47 return clone; 48 } 39 49 } 40 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseJob.cs
r3011 r4133 26 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 27 27 using System.Runtime.Serialization; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// If a client pulls a Job from the server he gets a ResponseJob as answer 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 [Serializable] 37 39 public class ResponseJob : Response { 40 [Storable] 38 41 [DataMember] 39 42 public JobDto Job { get; set; } 43 44 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 45 ResponseJob clone = (ResponseJob) base.Clone(cloner); 46 clone.Job = (JobDto)cloner.Clone(this.Job); 47 return clone; 48 } 40 49 } 41 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseList.cs
r1530 r4133 27 27 using System.ServiceModel; 28 28 using HeuristicLab.Hive.Contracts.BusinessObjects; 29 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 30 using HeuristicLab.Common; 29 31 30 32 namespace HeuristicLab.Hive.Contracts { 31 33 [StorableClass] 32 34 [DataContract] 33 public class ResponseList<T> : Response { 35 public class ResponseList<T> : Response 36 where T : IDeepCloneable { 37 [Storable] 34 38 [DataMember] 35 39 public IList<T> List { get; set; } 36 40 41 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 42 ResponseList<T> clone = (ResponseList<T>)base.Clone(cloner); 43 clone.List = (from elem in List 44 select (T)cloner.Clone(elem)).ToList(); 45 return clone; 46 } 37 47 } 38 48 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObject.cs
r1530 r4133 25 25 using System.Text; 26 26 using System.Runtime.Serialization; 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using HeuristicLab.Common; 27 29 28 30 namespace HeuristicLab.Hive.Contracts { 29 31 [StorableClass] 30 32 [DataContract] 31 public class ResponseObject<T> : Response { 33 public class ResponseObject<T> : Response 34 where T : IDeepCloneable { 35 [Storable] 32 36 [DataMember] 33 37 public T Obj { get; set; } 34 38 39 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 40 ResponseObject<T> clone = (ResponseObject<T>)base.Clone(cloner); 41 clone.Obj = (T)cloner.Clone(this.Obj); 42 return clone; 43 } 35 44 } 36 45 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponsePlugin.cs
r3011 r4133 5 5 using System.Runtime.Serialization; 6 6 using HeuristicLab.PluginInfrastructure; 7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 7 8 8 9 namespace HeuristicLab.Hive.Contracts { 9 10 [StorableClass] 10 11 [DataContract] 11 12 [Serializable] 12 13 public class ResponsePlugin : Response { 14 [Storable] 15 [DataMember] 16 public List<CachedHivePluginInfoDto> Plugins { get; set; } 17 13 18 public ResponsePlugin() { 14 19 Plugins = new List<CachedHivePluginInfoDto>(); 15 20 } 16 21 17 [DataMember] 18 public List<CachedHivePluginInfoDto> Plugins { get; set; } 22 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 23 ResponsePlugin clone = (ResponsePlugin) base.Clone(cloner); 24 clone.Plugins = (from p in Plugins 25 select (CachedHivePluginInfoDto)cloner.Clone(p)).ToList(); 26 return clone; 27 } 19 28 } 20 29 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseResultReceived.cs
r3011 r4133 26 26 using System.Runtime.Serialization; 27 27 using HeuristicLab.Hive.Contracts.BusinessObjects; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { 31 [StorableClass] 30 32 [DataContract] 31 33 public class ResponseResultReceived : Response { 34 [Storable] 32 35 [DataMember] 33 36 public Guid JobId { get; set; } 37 [Storable] 34 38 [DataMember] 35 public bool finished { get; set; } 39 public bool Finished { get; set; } 40 41 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 42 ResponseResultReceived clone = (ResponseResultReceived) base.Clone(cloner); 43 clone.Finished = this.Finished; 44 clone.JobId = this.JobId; 45 return clone; 46 } 36 47 } 37 48 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseSerializedJob.cs
r2117 r4133 26 26 using HeuristicLab.Hive.Contracts.BusinessObjects; 27 27 using System.Runtime.Serialization; 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 29 29 30 namespace HeuristicLab.Hive.Contracts { … … 33 34 /// If a client pulls a Job from the server he gets a ResponseJob as answer 34 35 /// </summary> 36 [StorableClass] 35 37 [DataContract] 36 38 [Serializable] 37 39 public class ResponseSerializedJob : Response { 40 [Storable] 38 41 [DataMember] 39 42 public SerializedJob Job { get; set; } 43 44 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 45 ResponseSerializedJob clone = (ResponseSerializedJob) base.Clone(cloner); 46 clone.Job = (SerializedJob)cloner.Clone(this.Job); 47 return clone; 48 } 40 49 } 41 50 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Engine/3.3/HeuristicLab.Hive.Engine-3.3.csproj
r4121 r4133 97 97 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> 98 98 </Reference> 99 <Reference Include="HeuristicLab.Data-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />100 <Reference Include="HeuristicLab.DataAccess-3.3 , Version=3.3.0.4091, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />101 <Reference Include="HeuristicLab.Persistence-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />99 <Reference Include="HeuristicLab.Data-3.3" /> 100 <Reference Include="HeuristicLab.DataAccess-3.3" /> 101 <Reference Include="HeuristicLab.Persistence-3.3" /> 102 102 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 103 103 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HeuristicLab.Hive.Experiment.Views-3.3.csproj
r4121 r4133 73 73 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath> 74 74 </Reference> 75 <Reference Include="HeuristicLab.DataAccess-3.3, Version=3.3.0.4091, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">76 <SpecificVersion>False</SpecificVersion>77 </Reference>78 75 <Reference Include="HeuristicLab.MainForm-3.3"> 79 76 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.MainForm-3.3.dll</HintPath> … … 91 88 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Optimization.Views-3.3.dll</HintPath> 92 89 </Reference> 93 <Reference Include="HeuristicLab.Persistence-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">90 <Reference Include="HeuristicLab.Persistence-3.3"> 94 91 <SpecificVersion>False</SpecificVersion> 95 92 </Reference> … … 128 125 </Compile> 129 126 <Compile Include="Properties\AssemblyInfo.cs" /> 127 <Compile Include="Properties\Resources.Designer.cs"> 128 <AutoGen>True</AutoGen> 129 <DesignTime>True</DesignTime> 130 <DependentUpon>Resources.resx</DependentUpon> 131 </Compile> 130 132 </ItemGroup> 131 133 <ItemGroup> … … 134 136 </ItemGroup> 135 137 <ItemGroup> 138 <ProjectReference Include="..\..\HeuristicLab.DataAccess\3.3\HeuristicLab.DataAccess-3.3.csproj"> 139 <Project>{9076697B-C151-46CD-95BC-1D059492B478}</Project> 140 <Name>HeuristicLab.DataAccess-3.3</Name> 141 </ProjectReference> 136 142 <ProjectReference Include="..\..\HeuristicLab.Hive.Contracts\3.3\HeuristicLab.Hive.Contracts-3.3.csproj"> 137 143 <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project> … … 154 160 <DependentUpon>JobItemView.cs</DependentUpon> 155 161 </EmbeddedResource> 162 <EmbeddedResource Include="Properties\Resources.resx"> 163 <Generator>ResXFileCodeGenerator</Generator> 164 <LastGenOutput>Resources.Designer.cs</LastGenOutput> 165 </EmbeddedResource> 156 166 </ItemGroup> 157 167 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.Designer.cs
r4120 r4133 66 66 this.serverUrlTextBox = new System.Windows.Forms.TextBox(); 67 67 this.resourceIdsTextBox = new System.Windows.Forms.TextBox(); 68 this.disconnectButton = new System.Windows.Forms.Button(); 69 this.reconnectButton = new System.Windows.Forms.Button(); 68 70 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit(); 69 71 this.tabControl.SuspendLayout(); … … 308 310 this.resourceIdsTextBox.Validated += new System.EventHandler(this.resourceIdsTextBox_Validated); 309 311 // 312 // disconnectButton 313 // 314 this.disconnectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 315 this.disconnectButton.Enabled = false; 316 this.disconnectButton.Image = ((System.Drawing.Image)(resources.GetObject("disconnectButton.Image"))); 317 this.disconnectButton.Location = new System.Drawing.Point(120, 500); 318 this.disconnectButton.Name = "disconnectButton"; 319 this.disconnectButton.Size = new System.Drawing.Size(24, 24); 320 this.disconnectButton.TabIndex = 15; 321 this.toolTip.SetToolTip(this.disconnectButton, "Disconnect from Hive (Jobs will be continue to be calculated)"); 322 this.disconnectButton.UseVisualStyleBackColor = true; 323 this.disconnectButton.Click += new System.EventHandler(this.disconnectButton_Click); 324 // 325 // reconnectButton 326 // 327 this.reconnectButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left))); 328 this.reconnectButton.Enabled = false; 329 this.reconnectButton.Image = ((System.Drawing.Image)(resources.GetObject("reconnectButton.Image"))); 330 this.reconnectButton.Location = new System.Drawing.Point(150, 500); 331 this.reconnectButton.Name = "reconnectButton"; 332 this.reconnectButton.Size = new System.Drawing.Size(24, 24); 333 this.reconnectButton.TabIndex = 16; 334 this.toolTip.SetToolTip(this.reconnectButton, "Reconnect to Hive"); 335 this.reconnectButton.UseVisualStyleBackColor = true; 336 this.reconnectButton.Click += new System.EventHandler(this.reconnectButton_Click); 337 // 310 338 // HiveExperimentView 311 339 // 312 340 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 313 341 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 342 this.Controls.Add(this.reconnectButton); 343 this.Controls.Add(this.disconnectButton); 314 344 this.Controls.Add(this.resourceIdsTextBox); 315 345 this.Controls.Add(this.serverUrlTextBox); … … 340 370 this.Controls.SetChildIndex(this.serverUrlTextBox, 0); 341 371 this.Controls.SetChildIndex(this.resourceIdsTextBox, 0); 372 this.Controls.SetChildIndex(this.disconnectButton, 0); 373 this.Controls.SetChildIndex(this.reconnectButton, 0); 342 374 ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit(); 343 375 this.tabControl.ResumeLayout(false); … … 371 403 private Core.Views.LogView logView; 372 404 private JobItemListView jobListView; 405 private System.Windows.Forms.Button disconnectButton; 406 private System.Windows.Forms.Button reconnectButton; 373 407 374 408 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs
r4120 r4133 58 58 Content.Stopped -= new EventHandler(Content_Stopped); 59 59 Content.ExperimentChanged -= new EventHandler(Content_ExperimentChanged); 60 Content.IsResultsPollingChanged -= new EventHandler(Content_IsResultsPollingChanged); 60 61 base.DeregisterContentEvents(); 61 62 } 63 62 64 protected override void RegisterContentEvents() { 63 65 base.RegisterContentEvents(); … … 69 71 Content.Paused += new EventHandler(Content_Paused); 70 72 Content.Stopped += new EventHandler(Content_Stopped); 73 Content.IsResultsPollingChanged += new EventHandler(Content_IsResultsPollingChanged); 71 74 Content.ExperimentChanged += new EventHandler(Content_ExperimentChanged); 72 75 } … … 130 133 else { 131 134 nameTextBox.Enabled = descriptionTextBox.Enabled = false; 132 Locked = true;133 135 SetEnabledStateOfExecutableButtons(); 134 136 } … … 139 141 else { 140 142 nameTextBox.Enabled = descriptionTextBox.Enabled = true; 141 Locked = false;142 143 SetEnabledStateOfExecutableButtons(); 143 144 } … … 164 165 ErrorHandling.ShowErrorDialog(this, e.Value); 165 166 } 167 private void Content_IsResultsPollingChanged(object sender, EventArgs e) { 168 if (InvokeRequired) 169 Invoke(new EventHandler(Content_IsResultsPollingChanged), sender, e); 170 else { 171 SetEnabledStateOfControls(); 172 } 173 } 166 174 #endregion 167 175 … … 179 187 Content.Prepare(); 180 188 } 181 #endregion182 183 #region Helpers184 private void SetEnabledStateOfExecutableButtons() {185 if (Content == null) {186 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = false;187 } else {188 startButton.Enabled = (Content.ExecutionState == ExecutionState.Prepared) || (Content.ExecutionState == ExecutionState.Paused);189 //pauseButton.Enabled = Content.ExecutionState == ExecutionState.Started;190 pauseButton.Enabled = false; // disabled for now191 stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);192 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;193 194 }195 }196 #endregion197 189 198 190 private void serverUrlTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) { … … 235 227 } 236 228 229 private void disconnectButton_Click(object sender, EventArgs e) { 230 if (Content != null) { 231 Content.StopResultPolling(); 232 SetEnabledStateOfControls(); 233 } 234 } 235 236 private void reconnectButton_Click(object sender, EventArgs e) { 237 if (Content != null) { 238 Content.StartResultPolling(); 239 SetEnabledStateOfControls(); 240 } 241 } 242 #endregion 243 244 #region Helpers 245 private void SetEnabledStateOfExecutableButtons() { 246 if (Content == null) { 247 startButton.Enabled = pauseButton.Enabled = stopButton.Enabled = resetButton.Enabled = reconnectButton.Enabled = disconnectButton.Enabled = false; 248 } else { 249 startButton.Enabled = Content.ExecutionState == ExecutionState.Prepared; 250 pauseButton.Enabled = false; // disabled for now 251 stopButton.Enabled = Content.ExecutionState == ExecutionState.Started && Content.IsPollingResults; 252 resetButton.Enabled = Content.ExecutionState != ExecutionState.Started; 253 reconnectButton.Enabled = (Content.ExecutionState == ExecutionState.Started) && !Content.IsPollingResults; 254 disconnectButton.Enabled = (Content.ExecutionState == ExecutionState.Started) && Content.IsPollingResults; 255 256 this.Locked = Content.ExecutionState == ExecutionState.Started && Content.IsPollingResults; 257 } 258 } 259 #endregion 237 260 } 238 261 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.resx
r4120 r4133 121 121 <value>102, 17</value> 122 122 </metadata> 123 <metadata name="errorProvider.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 <value>102, 17</value> 125 </metadata> 123 126 <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"> 124 127 <value>17, 17</value> … … 128 131 <value> 129 132 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 130 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAL CAAA131 Cw gBwL2l2gAAALZJREFUOE9j/P//PwNFAGQAOi7bn+2GTRybGIZmkKKEGRH/iTUEpwGWZfpEGYLVgKgp133 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA 134 CwYBZDTpJAAAALZJREFUOE9j/P//PwNFAGQAOi7bn+2GTRybGIZmkKKEGRH/iTUEpwGWZfpEGYLVgKgp 132 135 Qf833Fr8nxhDsBoQPMEbZDtRhmA1wKfLGWwACEctCsDrEqwGODZb/M/YEAvWbNus/1+nWOG/RBo3iFZD 133 136 jwmsBpjX6KFo5k9gwaoZnIawxa1eqTLcZnyacRqgki8FdjYhzTgNkM4QJEozTgNEkjlx+pmoQMQW2rjy … … 138 141 <value> 139 142 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 140 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAL CAAA141 Cw gBwL2l2gAAAXJJREFUOE+tkj1IQmEYhWsoaIi2xmhpiYSgKFoiCMLJJYSEJiEI0mgIyqjA6vaLUKIU143 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA 144 CwYBZDTpJAAAAXJJREFUOE+tkj1IQmEYhWsoaIi2xmhpiYSgKFoiCMLJJYSEJiEI0mgIyqjA6vaLUKIU 142 145 iZlJKKUoWEbZDzVYCYlQYVxcNDIoRND8ud7idD83C27g7YNvPM8573nfcgBlgh4BCPmCxIX0Qtx/ATTu 143 146 Lyy78ph3ZKC2pTBlSWB86w2jhleMrD9jWB9N/jQsSkDEj5FPPERZ+J7yOL5j4PYzsPsYGL1piKR7nL64 … … 151 154 <value> 152 155 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 153 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAAL CAAA154 Cw gBwL2l2gAAAYNJREFUOE9j/P//PwNFAGQAJZgizWDXI9veu/nvfxhuW/vtf+OKz/9rF7//XzHv1f+S156 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA 157 CwYBZDTpJAAAAYNJREFUOE9j/P//PwNFAGQAJZgizWDXI9veu/nvfxhuW/vtf+OKz/9rF7//XzHv1f+S 155 158 2c//F0x//L901mOgFoSrUQzo2vDr/6aT3/6vPPTl/4I9n/5ffvDzf+/ad/+bl74BG5I3/cV/3dBVuA0A 156 159 2bri4Jf/83Z9+n/ryS+Qwv8NS978L5378n/O1Of/k3qf/Vf1W4TbAJCT5+z49P/hyx9gzSBQMvvl/6wp … … 164 167 <value> 165 168 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 166 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALCAAA 167 CwgBwL2l2gAAAMZJREFUOE9j/P//PwNFAGQAJZgizWDXU2I7VgN6N//937Xh1/+8qY8+gRSg89EtxHAB 169 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA 170 CwYBZDTpJAAAAMZJREFUOE9j/P//PwNFAGQAJZgizWDXU2I7VgN6N//937Xh1/+8qY8+gRSg89EtxHAB 171 SPPVh3/+64auAqr9z4DOJ2hA29pv/289/f1f1W8R2AB0PkEDGld8/n/54e//cm6zwAag8wkaULv4/f8T 172 13//F7ObBDYAnU/QgIp5r/7vvvDzP79ZN9gAdD5BA0pmP/+//uTP/5wGrWAD0PkEDSiY/vj/gj2f/7Pq 173 NIINQOcTNAAU/2y6TXAD0PkEDSA1ZVI/KZPqAgBmE8VVB/UQsAAAAABJRU5ErkJggg== 174 </value> 175 </data> 176 <data name="disconnectButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 177 <value> 178 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 179 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBQAA 180 CwUByY3ISQAAAMZJREFUOE9j/P//PwNFAGQAJZgizWDXU2I7VgN6N//937Xh1/+8qY8+gRSg89EtxHAB 181 SPPVh3/+64auAqr9z4DOJ2hA29pv/289/f1f1W8R2AB0PkEDGld8/n/54e//cm6zwAag8wkaULv4/f8T 182 13//F7ObBDYAnU/QgIp5r/7vvvDzP79ZN9gAdD5BA0pmP/+//uTP/5wGrWAD0PkEDSiY/vj/gj2f/7Pq 183 NIINQOcTNAAU/2y6TXAD0PkEDSA1ZVI/KZPqAgBmE8VVB/UQsAAAAABJRU5ErkJggg== 184 </value> 185 </data> 186 <data name="reconnectButton.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> 187 <value> 188 iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 189 YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBAAA 190 CwQBG8oqrQAAAMZJREFUOE9j/P//PwNFAGQAJZgizWDXU2I7VgN6N//937Xh1/+8qY8+gRSg89EtxHAB 168 191 SPPVh3/+64auAqr9z4DOJ2hA29pv/289/f1f1W8R2AB0PkEDGld8/n/54e//cm6zwAag8wkaULv4/f8T 169 192 13//F7ObBDYAnU/QgIp5r/7vvvDzP79ZN9gAdD5BA0pmP/+//uTP/5wGrWAD0PkEDSiY/vj/gj2f/7Pq -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.Designer.cs
r4121 r4133 54 54 this.jobStatusGroupBox = new System.Windows.Forms.GroupBox(); 55 55 this.percentageProgressBar = new System.Windows.Forms.ProgressBar(); 56 this.tabControl = new System.Windows.Forms.TabControl(); 57 this.detailsTabPage = new System.Windows.Forms.TabPage(); 58 this.logTabPage = new System.Windows.Forms.TabPage(); 59 this.logView = new HeuristicLab.Core.Views.LogView(); 56 60 this.snapshotGroupBox.SuspendLayout(); 57 61 this.jobStatusGroupBox.SuspendLayout(); 62 this.tabControl.SuspendLayout(); 63 this.detailsTabPage.SuspendLayout(); 64 this.logTabPage.SuspendLayout(); 58 65 this.SuspendLayout(); 59 66 // … … 70 77 // 71 78 this.userIdLabel.AutoSize = true; 72 this.userIdLabel.Location = new System.Drawing.Point( 4, 3);79 this.userIdLabel.Location = new System.Drawing.Point(3, 3); 73 80 this.userIdLabel.Name = "userIdLabel"; 74 81 this.userIdLabel.Size = new System.Drawing.Size(41, 13); … … 82 89 this.stateTextBox.Location = new System.Drawing.Point(95, 19); 83 90 this.stateTextBox.Name = "stateTextBox"; 84 this.stateTextBox.Size = new System.Drawing.Size( 395, 20);91 this.stateTextBox.Size = new System.Drawing.Size(432, 20); 85 92 this.stateTextBox.TabIndex = 2; 86 93 // … … 89 96 this.userIdTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 90 97 | System.Windows.Forms.AnchorStyles.Right))); 91 this.userIdTextBox.Location = new System.Drawing.Point(9 2, 3);98 this.userIdTextBox.Location = new System.Drawing.Point(91, 3); 92 99 this.userIdTextBox.Name = "userIdTextBox"; 93 this.userIdTextBox.Size = new System.Drawing.Size(4 11, 20);100 this.userIdTextBox.Size = new System.Drawing.Size(448, 20); 94 101 this.userIdTextBox.TabIndex = 3; 95 102 // … … 107 114 this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 63); 108 115 this.dateCreatedTextBox.Name = "dateCreatedTextBox"; 109 this.dateCreatedTextBox.Size = new System.Drawing.Size( 395, 20);116 this.dateCreatedTextBox.Size = new System.Drawing.Size(432, 20); 110 117 this.dateCreatedTextBox.TabIndex = 5; 111 118 // … … 116 123 this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 107); 117 124 this.dateFinishedTextBox.Name = "dateFinishedTextBox"; 118 this.dateFinishedTextBox.Size = new System.Drawing.Size( 395, 20);125 this.dateFinishedTextBox.Size = new System.Drawing.Size(432, 20); 119 126 this.dateFinishedTextBox.TabIndex = 6; 120 127 // … … 123 130 this.priorityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 124 131 | System.Windows.Forms.AnchorStyles.Right))); 125 this.priorityTextBox.Location = new System.Drawing.Point(9 2, 25);132 this.priorityTextBox.Location = new System.Drawing.Point(91, 25); 126 133 this.priorityTextBox.Name = "priorityTextBox"; 127 this.priorityTextBox.Size = new System.Drawing.Size(4 11, 20);134 this.priorityTextBox.Size = new System.Drawing.Size(448, 20); 128 135 this.priorityTextBox.TabIndex = 7; 129 136 // … … 132 139 this.coresNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 133 140 | System.Windows.Forms.AnchorStyles.Right))); 134 this.coresNeededTextBox.Location = new System.Drawing.Point(9 2, 47);141 this.coresNeededTextBox.Location = new System.Drawing.Point(91, 47); 135 142 this.coresNeededTextBox.Name = "coresNeededTextBox"; 136 this.coresNeededTextBox.Size = new System.Drawing.Size(4 11, 20);143 this.coresNeededTextBox.Size = new System.Drawing.Size(448, 20); 137 144 this.coresNeededTextBox.TabIndex = 8; 138 145 // … … 141 148 this.memoryNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 142 149 | System.Windows.Forms.AnchorStyles.Right))); 143 this.memoryNeededTextBox.Location = new System.Drawing.Point(9 2, 69);150 this.memoryNeededTextBox.Location = new System.Drawing.Point(91, 69); 144 151 this.memoryNeededTextBox.Name = "memoryNeededTextBox"; 145 this.memoryNeededTextBox.Size = new System.Drawing.Size(4 11, 20);152 this.memoryNeededTextBox.Size = new System.Drawing.Size(448, 20); 146 153 this.memoryNeededTextBox.TabIndex = 9; 147 154 // … … 150 157 this.pluginsNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 151 158 | System.Windows.Forms.AnchorStyles.Right))); 152 this.pluginsNeededTextBox.Location = new System.Drawing.Point(9 2, 91);159 this.pluginsNeededTextBox.Location = new System.Drawing.Point(91, 91); 153 160 this.pluginsNeededTextBox.Name = "pluginsNeededTextBox"; 154 this.pluginsNeededTextBox.Size = new System.Drawing.Size(4 11, 20);161 this.pluginsNeededTextBox.Size = new System.Drawing.Size(448, 20); 155 162 this.pluginsNeededTextBox.TabIndex = 10; 156 163 // … … 159 166 this.projectTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left) 160 167 | System.Windows.Forms.AnchorStyles.Right))); 161 this.projectTextBox.Location = new System.Drawing.Point(9 2, 113);168 this.projectTextBox.Location = new System.Drawing.Point(91, 113); 162 169 this.projectTextBox.Name = "projectTextBox"; 163 this.projectTextBox.Size = new System.Drawing.Size(4 11, 20);170 this.projectTextBox.Size = new System.Drawing.Size(448, 20); 164 171 this.projectTextBox.TabIndex = 11; 165 172 // … … 194 201 // 195 202 this.priorityLabel.AutoSize = true; 196 this.priorityLabel.Location = new System.Drawing.Point( 4, 25);203 this.priorityLabel.Location = new System.Drawing.Point(3, 25); 197 204 this.priorityLabel.Name = "priorityLabel"; 198 205 this.priorityLabel.Size = new System.Drawing.Size(41, 13); … … 203 210 // 204 211 this.coresNeededLabel.AutoSize = true; 205 this.coresNeededLabel.Location = new System.Drawing.Point( 4, 47);212 this.coresNeededLabel.Location = new System.Drawing.Point(3, 47); 206 213 this.coresNeededLabel.Name = "coresNeededLabel"; 207 214 this.coresNeededLabel.Size = new System.Drawing.Size(75, 13); … … 212 219 // 213 220 this.memoryNeededLabel.AutoSize = true; 214 this.memoryNeededLabel.Location = new System.Drawing.Point( 4, 69);221 this.memoryNeededLabel.Location = new System.Drawing.Point(3, 69); 215 222 this.memoryNeededLabel.Name = "memoryNeededLabel"; 216 223 this.memoryNeededLabel.Size = new System.Drawing.Size(85, 13); … … 221 228 // 222 229 this.pluginsNeededLabel.AutoSize = true; 223 this.pluginsNeededLabel.Location = new System.Drawing.Point( 4, 91);230 this.pluginsNeededLabel.Location = new System.Drawing.Point(3, 91); 224 231 this.pluginsNeededLabel.Name = "pluginsNeededLabel"; 225 232 this.pluginsNeededLabel.Size = new System.Drawing.Size(82, 13); … … 230 237 // 231 238 this.projectLabel.AutoSize = true; 232 this.projectLabel.Location = new System.Drawing.Point( 4, 113);239 this.projectLabel.Location = new System.Drawing.Point(3, 113); 233 240 this.projectLabel.Name = "projectLabel"; 234 241 this.projectLabel.Size = new System.Drawing.Size(43, 13); … … 245 252 this.snapshotGroupBox.Controls.Add(this.snapshotTimeLabel); 246 253 this.snapshotGroupBox.Controls.Add(this.snapshotStatusLabel); 247 this.snapshotGroupBox.Location = new System.Drawing.Point( 7, 279);254 this.snapshotGroupBox.Location = new System.Drawing.Point(6, 279); 248 255 this.snapshotGroupBox.Name = "snapshotGroupBox"; 249 this.snapshotGroupBox.Size = new System.Drawing.Size( 496, 100);256 this.snapshotGroupBox.Size = new System.Drawing.Size(533, 100); 250 257 this.snapshotGroupBox.TabIndex = 21; 251 258 this.snapshotGroupBox.TabStop = false; … … 255 262 // 256 263 this.openSnapshotButton.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right))); 257 this.openSnapshotButton.Location = new System.Drawing.Point( 389, 67);264 this.openSnapshotButton.Location = new System.Drawing.Point(426, 67); 258 265 this.openSnapshotButton.Name = "openSnapshotButton"; 259 266 this.openSnapshotButton.Size = new System.Drawing.Size(101, 26); … … 269 276 this.snapshotTimeText.Location = new System.Drawing.Point(45, 41); 270 277 this.snapshotTimeText.Name = "snapshotTimeText"; 271 this.snapshotTimeText.Size = new System.Drawing.Size(4 45, 20);278 this.snapshotTimeText.Size = new System.Drawing.Size(482, 20); 272 279 this.snapshotTimeText.TabIndex = 24; 273 280 // … … 278 285 this.snapshotStatusText.Location = new System.Drawing.Point(45, 19); 279 286 this.snapshotStatusText.Name = "snapshotStatusText"; 280 this.snapshotStatusText.Size = new System.Drawing.Size(4 45, 20);287 this.snapshotStatusText.Size = new System.Drawing.Size(482, 20); 281 288 this.snapshotStatusText.TabIndex = 23; 282 289 // … … 305 312 this.dateCalculatedText.Location = new System.Drawing.Point(95, 85); 306 313 this.dateCalculatedText.Name = "dateCalculatedText"; 307 this.dateCalculatedText.Size = new System.Drawing.Size( 395, 20);314 this.dateCalculatedText.Size = new System.Drawing.Size(432, 20); 308 315 this.dateCalculatedText.TabIndex = 22; 309 316 // … … 332 339 this.jobStatusGroupBox.Controls.Add(this.dateCreatedLabel); 333 340 this.jobStatusGroupBox.Controls.Add(this.dateFinishedLabel); 334 this.jobStatusGroupBox.Location = new System.Drawing.Point( 7, 139);341 this.jobStatusGroupBox.Location = new System.Drawing.Point(6, 139); 335 342 this.jobStatusGroupBox.Name = "jobStatusGroupBox"; 336 this.jobStatusGroupBox.Size = new System.Drawing.Size( 496, 134);343 this.jobStatusGroupBox.Size = new System.Drawing.Size(533, 134); 337 344 this.jobStatusGroupBox.TabIndex = 24; 338 345 this.jobStatusGroupBox.TabStop = false; … … 345 352 this.percentageProgressBar.Location = new System.Drawing.Point(153, 41); 346 353 this.percentageProgressBar.Name = "percentageProgressBar"; 347 this.percentageProgressBar.Size = new System.Drawing.Size(3 37, 20);354 this.percentageProgressBar.Size = new System.Drawing.Size(374, 20); 348 355 this.percentageProgressBar.TabIndex = 25; 356 // 357 // tabControl 358 // 359 this.tabControl.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 360 | System.Windows.Forms.AnchorStyles.Left) 361 | System.Windows.Forms.AnchorStyles.Right))); 362 this.tabControl.Controls.Add(this.detailsTabPage); 363 this.tabControl.Controls.Add(this.logTabPage); 364 this.tabControl.Location = new System.Drawing.Point(3, 3); 365 this.tabControl.Name = "tabControl"; 366 this.tabControl.SelectedIndex = 0; 367 this.tabControl.Size = new System.Drawing.Size(550, 479); 368 this.tabControl.TabIndex = 25; 369 // 370 // detailsTabPage 371 // 372 this.detailsTabPage.Controls.Add(this.userIdLabel); 373 this.detailsTabPage.Controls.Add(this.jobStatusGroupBox); 374 this.detailsTabPage.Controls.Add(this.userIdTextBox); 375 this.detailsTabPage.Controls.Add(this.snapshotGroupBox); 376 this.detailsTabPage.Controls.Add(this.priorityTextBox); 377 this.detailsTabPage.Controls.Add(this.projectLabel); 378 this.detailsTabPage.Controls.Add(this.coresNeededTextBox); 379 this.detailsTabPage.Controls.Add(this.pluginsNeededLabel); 380 this.detailsTabPage.Controls.Add(this.memoryNeededTextBox); 381 this.detailsTabPage.Controls.Add(this.memoryNeededLabel); 382 this.detailsTabPage.Controls.Add(this.pluginsNeededTextBox); 383 this.detailsTabPage.Controls.Add(this.coresNeededLabel); 384 this.detailsTabPage.Controls.Add(this.projectTextBox); 385 this.detailsTabPage.Controls.Add(this.priorityLabel); 386 this.detailsTabPage.Location = new System.Drawing.Point(4, 22); 387 this.detailsTabPage.Name = "detailsTabPage"; 388 this.detailsTabPage.Padding = new System.Windows.Forms.Padding(3); 389 this.detailsTabPage.Size = new System.Drawing.Size(542, 453); 390 this.detailsTabPage.TabIndex = 0; 391 this.detailsTabPage.Text = "Details"; 392 this.detailsTabPage.UseVisualStyleBackColor = true; 393 // 394 // logTabPage 395 // 396 this.logTabPage.Controls.Add(this.logView); 397 this.logTabPage.Location = new System.Drawing.Point(4, 22); 398 this.logTabPage.Name = "logTabPage"; 399 this.logTabPage.Padding = new System.Windows.Forms.Padding(3); 400 this.logTabPage.Size = new System.Drawing.Size(542, 453); 401 this.logTabPage.TabIndex = 1; 402 this.logTabPage.Text = "Log"; 403 this.logTabPage.UseVisualStyleBackColor = true; 404 // 405 // logView 406 // 407 this.logView.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) 408 | System.Windows.Forms.AnchorStyles.Left) 409 | System.Windows.Forms.AnchorStyles.Right))); 410 this.logView.Caption = "Log View"; 411 this.logView.Content = null; 412 this.logView.Location = new System.Drawing.Point(3, 3); 413 this.logView.Name = "logView"; 414 this.logView.ReadOnly = false; 415 this.logView.Size = new System.Drawing.Size(536, 447); 416 this.logView.TabIndex = 0; 349 417 // 350 418 // JobItemView … … 352 420 this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 353 421 this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 354 this.Controls.Add(this.jobStatusGroupBox); 355 this.Controls.Add(this.snapshotGroupBox); 356 this.Controls.Add(this.projectLabel); 357 this.Controls.Add(this.pluginsNeededLabel); 358 this.Controls.Add(this.memoryNeededLabel); 359 this.Controls.Add(this.coresNeededLabel); 360 this.Controls.Add(this.priorityLabel); 361 this.Controls.Add(this.projectTextBox); 362 this.Controls.Add(this.pluginsNeededTextBox); 363 this.Controls.Add(this.memoryNeededTextBox); 364 this.Controls.Add(this.coresNeededTextBox); 365 this.Controls.Add(this.priorityTextBox); 366 this.Controls.Add(this.userIdTextBox); 367 this.Controls.Add(this.userIdLabel); 422 this.Controls.Add(this.tabControl); 368 423 this.Name = "JobItemView"; 369 this.Size = new System.Drawing.Size(5 06, 409);424 this.Size = new System.Drawing.Size(556, 485); 370 425 this.snapshotGroupBox.ResumeLayout(false); 371 426 this.snapshotGroupBox.PerformLayout(); 372 427 this.jobStatusGroupBox.ResumeLayout(false); 373 428 this.jobStatusGroupBox.PerformLayout(); 429 this.tabControl.ResumeLayout(false); 430 this.detailsTabPage.ResumeLayout(false); 431 this.detailsTabPage.PerformLayout(); 432 this.logTabPage.ResumeLayout(false); 374 433 this.ResumeLayout(false); 375 this.PerformLayout();376 434 377 435 } … … 409 467 private System.Windows.Forms.GroupBox jobStatusGroupBox; 410 468 private System.Windows.Forms.ProgressBar percentageProgressBar; 469 private System.Windows.Forms.TabControl tabControl; 470 private System.Windows.Forms.TabPage detailsTabPage; 471 private System.Windows.Forms.TabPage logTabPage; 472 private Core.Views.LogView logView; 411 473 } 412 474 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs
r4121 r4133 34 34 base.OnContentChanged(); 35 35 if (Content != null) { 36 logView.Content = Content.Log; 36 37 Content_JobDtoChanged(this, EventArgs.Empty); 37 38 if (Content.LatestSnapshot != null) { -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/Properties/AssemblyInfo.cs
r4121 r4133 55 55 // You can specify all the values or you can default the Revision and Build Numbers 56 56 // by using the '*' as shown below: 57 [assembly: AssemblyVersion("3.3.0.412 0")]58 [assembly: AssemblyFileVersion("3.3.0.412 0")]59 [assembly: AssemblyBuildDate("2010/0 7/30 13:39:18")]57 [assembly: AssemblyVersion("3.3.0.4121")] 58 [assembly: AssemblyFileVersion("3.3.0.4121")] 59 [assembly: AssemblyBuildDate("2010/08/02 17:23:51")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HeuristicLab.Hive.Experiment-3.3.csproj
r4120 r4133 85 85 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 86 86 </Reference> 87 <Reference Include="HeuristicLab.Tracing-3.3 , Version=3.2.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />87 <Reference Include="HeuristicLab.Tracing-3.3" /> 88 88 <Reference Include="System" /> 89 89 <Reference Include="System.Core" /> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs
r4121 r4133 53 53 private const string itemDescription = "An experiment which contains multiple batch runs of algorithms which are executed in the Hive."; 54 54 private const int resultPollingIntervalMs = 15000; 55 55 private const int maxSnapshotRetries = 20; 56 56 private object locker = new object(); 57 private const int maxSnapshotRetries = 20; 57 58 58 private System.Timers.Timer timer; 59 59 private bool pausePending, stopPending; 60 61 [Storable] 60 62 private DateTime lastUpdateTime; 61 63 64 private bool isPollingResults; 65 public bool IsPollingResults { 66 get { return isPollingResults; } 67 private set { 68 if (isPollingResults != value) { 69 isPollingResults = value; 70 OnIsPollingResultsChanged(); 71 } 72 } 73 } 74 75 private bool stopResultsPollingPending = false; 76 77 private IDictionary<Guid, Thread> resultPollingThreads; 78 62 79 [Storable] 63 80 private IDictionary<Guid, IOptimizer> pendingOptimizers = new Dictionary<Guid, IOptimizer>(); … … 68 85 get { return jobItems; } 69 86 } 70 87 71 88 72 89 [Storable] … … 76 93 set { 77 94 if (serverUrl != value) { 78 serverUrl = value; 95 serverUrl = value; 79 96 OnServerUrlChanged(); 80 97 } … … 88 105 set { 89 106 if (resourceIds != value) { 90 resourceIds = value; 107 resourceIds = value; 91 108 OnResourceIdsChanged(); 92 109 } … … 115 132 public HiveExperiment(bool deserializing) 116 133 : base(deserializing) { 134 this.resultPollingThreads = new Dictionary<Guid, Thread>(); 135 jobItems = new JobItemList(); 117 136 } 118 137 … … 124 143 pausePending = stopPending = false; 125 144 jobItems = new JobItemList(); 145 isPollingResults = false; 146 resultPollingThreads = new Dictionary<Guid, Thread>(); 126 147 InitTimer(); 127 148 } … … 142 163 clone.pausePending = this.pausePending; 143 164 clone.jobItems = (JobItemList)cloner.Clone(jobItems); 165 clone.lastUpdateTime = this.lastUpdateTime; 166 clone.isPollingResults = this.isPollingResults; 144 167 return clone; 145 168 } … … 148 171 private void AfterDeserialization() { 149 172 InitTimer(); 173 this.IsPollingResults = false; 174 this.stopResultsPollingPending = false; 150 175 LogMessage("I was deserialized."); 151 176 } … … 215 240 this.ExecutionState = Core.ExecutionState.Started; 216 241 Thread t = new Thread(() => { 217 IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(ServerUrl);242 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 218 243 219 244 pendingOptimizers = new Dictionary<Guid, IOptimizer>(); … … 234 259 }; 235 260 jobItems.Add(jobItem); 236 237 LogMessage("Sent job to server (jobId: " + response.Obj.Id + ")"); 238 } 239 261 jobItem.LogMessage("Job sent to Hive"); 262 263 LogMessage("Sent job to Hive (jobId: " + response.Obj.Id + ")"); 264 } 265 240 266 // start results polling after sending sending the jobs to the server (to avoid race conflicts at the optimizers-collection) 241 foreach (JobItem jobItem in jobItems) { 242 StartResultPollingThread(jobItem.JobDto); 243 } 267 StartResultPolling(); 244 268 }); 245 269 t.Start(); 270 } 271 272 private void CreateResultPollingThreads() { 273 foreach(JobItem jobItem in JobItems) { 274 resultPollingThreads.Add(jobItem.JobDto.Id, CreateResultPollingThread(jobItem.JobDto)); 275 } 276 } 277 278 public void StartResultPolling() { 279 this.stopResultsPollingPending = false; 280 CreateResultPollingThreads(); 281 foreach (Thread pollingThread in resultPollingThreads.Values) { 282 pollingThread.Start(); 283 } 284 this.IsPollingResults = true; 285 } 286 287 public void StopResultPolling() { 288 this.stopResultsPollingPending = true; 289 foreach (Thread pollingThread in resultPollingThreads.Values) { 290 pollingThread.Interrupt(); 291 } 292 this.stopResultsPollingPending = false; 293 } 294 295 private JobItem GetJobItemById(Guid jobId) { 296 return jobItems.Single(x => x.JobDto.Id == jobId); 246 297 } 247 298 … … 267 318 268 319 public void Stop() { 269 // todo 270 } 271 320 foreach(JobItem jobItem in jobItems) { 321 AbortJob(jobItem.JobDto.Id); 322 } 323 } 324 325 public void AbortJob(Guid jobId) { 326 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 327 executionEngineFacade.AbortJob(jobId); 328 resultPollingThreads[jobId].Interrupt(); 329 GetJobItemById(jobId).LogMessage("Aborting Job"); 330 } 272 331 #endregion 332 333 private IExecutionEngineFacade GetExecutionEngineFacade() { 334 return ServiceLocator.CreateExecutionEngineFacade(ServerUrl); 335 } 273 336 274 337 private SerializedJob CreateSerializedJob(IOptimizer optimizer) { … … 307 370 } 308 371 309 private void StartResultPollingThread(JobDto job) { 310 Thread t = new Thread(() => { 311 IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(ServerUrl); 312 IJob restoredObject = null; 313 314 do { 315 Thread.Sleep(resultPollingIntervalMs); 316 //lock (locker) { [chn] try without locking for better performance 317 if (stopPending) return; 372 private Thread CreateResultPollingThread(JobDto job) { 373 return new Thread(() => { 374 try { 375 GetJobItemById(job.Id).LogMessage("Starting job results polling"); 376 IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade(); 377 IJob restoredObject = null; 378 379 do { 380 Thread.Sleep(resultPollingIntervalMs); 381 if (stopPending || !this.IsPollingResults) { 382 return; 383 } 318 384 319 385 ResponseObject<JobDto> response = executionEngineFacade.GetJobById(job.Id); 320 386 LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")"); 387 GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage); 321 388 322 389 if (response.Obj != null) { 323 390 UpdateJobItem(response.Obj); 324 391 } 325 392 326 393 // loop while 327 394 // 1. the user doesn't request an abort … … 334 401 UpdateSnapshot(jobResponse); 335 402 } 336 //} 337 } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped); 338 339 LogMessage("Job finished (jobId: " + job.Id + ")"); 340 // job retrieved... replace the existing optimizers with the finished one 341 IOptimizer originalOptimizer = pendingOptimizers[job.Id]; 342 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 343 344 ReplaceOptimizer(originalOptimizer, restoredOptimizer); 345 pendingOptimizers.Remove(job.Id); 346 347 if (pendingOptimizers.Count == 0) { 348 // finished 349 this.ExecutionState = Core.ExecutionState.Stopped; 350 OnStopped(); 403 } while (restoredObject == null || restoredObject.ExecutionState != Core.ExecutionState.Stopped); 404 405 LogMessage("Job finished (jobId: " + job.Id + ")"); 406 GetJobItemById(job.Id).LogMessage("Job finished"); 407 // job retrieved... replace the existing optimizers with the finished one 408 IOptimizer originalOptimizer = pendingOptimizers[job.Id]; 409 IOptimizer restoredOptimizer = ((OptimizerJob)restoredObject).Optimizer; 410 411 ReplaceOptimizer(originalOptimizer, restoredOptimizer); 412 pendingOptimizers.Remove(job.Id); 413 414 if (pendingOptimizers.Count == 0) { 415 // finished 416 this.ExecutionState = Core.ExecutionState.Stopped; 417 OnStopped(); 418 } 419 } catch (ThreadInterruptedException exception) { 420 421 } finally { 422 GetJobItemById(job.Id).LogMessage("ResultsPolling Thread stopped"); 423 resultPollingThreads.Remove(job.Id); 424 if (resultPollingThreads.Count == 0) { 425 IsPollingResults = false; 426 } 351 427 } 352 428 }); 353 t.Start();354 429 } 355 430 … … 370 445 } 371 446 } 372 447 373 448 #region Required Plugin Search 374 449 /// <summary> … … 523 598 } 524 599 600 public event EventHandler IsResultsPollingChanged; 601 private void OnIsPollingResultsChanged() { 602 if (this.IsPollingResults) { 603 LogMessage("Results Polling Started"); 604 timer.Start(); 605 } else { 606 LogMessage("Results Polling Stopped"); 607 timer.Stop(); 608 } 609 EventHandler handler = IsResultsPollingChanged; 610 if (handler != null) handler(this, EventArgs.Empty); 611 } 525 612 #endregion 526 613 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs
r4121 r4133 8 8 using HeuristicLab.Hive.Contracts; 9 9 using System.Drawing; 10 using HeuristicLab.Common; 11 using System.Diagnostics; 10 12 11 13 namespace HeuristicLab.Hive.Experiment { 14 [StorableClass] 12 15 public class JobItem : Item { 16 private static object locker = new object(); 17 13 18 public override Image ItemImage { 14 19 get { … … 59 64 get { return log; } 60 65 } 61 66 62 67 public JobItem() { 63 68 log = new Log(); … … 73 78 74 79 public event EventHandler LatestSnapshotChanged; 75 public void OnLatestSnapshotChanged() { 80 private void OnLatestSnapshotChanged() { 81 LogMessage("LatestSnapshotChanged"); 76 82 EventHandler handler = LatestSnapshotChanged; 77 83 if (handler != null) handler(this, EventArgs.Empty); … … 80 86 public event EventHandler JobDtoChanged; 81 87 private void OnJobDtoChanged() { 88 LogMessage("JobDtoChanged"); 82 89 EventHandler handler = JobDtoChanged; 83 90 if (handler != null) handler(this, EventArgs.Empty); 84 91 } 92 93 public void LogMessage(string message) { 94 lock (locker) { 95 log.LogMessage(message); 96 } 97 } 98 99 public override IDeepCloneable Clone(Cloner cloner) { 100 LogMessage("I am beeing cloned"); 101 JobItem clone = (JobItem)base.Clone(cloner); 102 clone.latestSnapshotTime = this.latestSnapshotTime; 103 clone.jobDto = (JobDto)cloner.Clone(this.jobDto); 104 clone.latestSnapshot = (ResponseObject<SerializedJob>)cloner.Clone(this.latestSnapshot); 105 clone.log = (ILog)cloner.Clone(this.log); 106 return clone; 107 } 85 108 } 86 109 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItemList.cs
r4120 r4133 14 14 public JobItemList(int capacity) : base(capacity) { } 15 15 public JobItemList(IEnumerable<JobItem> collection) : base(collection) { } 16 17 public override Common.IDeepCloneable Clone(Common.Cloner cloner) { 18 JobItemList clone = (JobItemList)base.Clone(cloner); 19 return clone; 20 } 16 21 } 17 22 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/AssemblyInfo.cs
r4121 r4133 55 55 // You can specify all the values or you can default the Revision and Build Numbers 56 56 // by using the '*' as shown below: 57 [assembly: AssemblyVersion("3.3.0.412 0")]58 [assembly: AssemblyFileVersion("3.3.0.412 0")]59 [assembly: AssemblyBuildDate("2010/0 7/30 13:39:10")]57 [assembly: AssemblyVersion("3.3.0.4121")] 58 [assembly: AssemblyFileVersion("3.3.0.4121")] 59 [assembly: AssemblyBuildDate("2010/08/02 17:23:46")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.JobBase/3.3/HeuristicLab.Hive.JobBase-3.3.csproj
r4121 r4133 91 91 </PropertyGroup> 92 92 <ItemGroup> 93 <Reference Include="HeuristicLab.Collections-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />94 <Reference Include="HeuristicLab.Common-3.3 , Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />93 <Reference Include="HeuristicLab.Collections-3.3" /> 94 <Reference Include="HeuristicLab.Common-3.3" /> 95 95 <Reference Include="HeuristicLab.Core-3.3"> 96 96 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Console/3.3/HeuristicLab.Hive.Server.Console-3.3.csproj
r4121 r4133 78 78 </PropertyGroup> 79 79 <ItemGroup> 80 <Reference Include="HeuristicLab.Common-3.3"> 81 <HintPath>..\..\HeuristicLab.Hive.JobBase\3.3\bin\Debug\HeuristicLab.Common-3.3.dll</HintPath> 82 </Reference> 80 83 <Reference Include="HeuristicLab.Core-3.3"> 81 84 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
r4119 r4133 584 584 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED; 585 585 response.JobId = jobId; 586 response. finished = finished;586 response.Finished = finished; 587 587 588 588 Logger.Info("END Job received for Storage - SUB method: " + jobId); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientManager.cs
r4060 r4133 168 168 } 169 169 170 public ResponseObject< List<ClientGroup>> GetAllGroupsOfResource(Guid resourceId) {171 ResponseObject< List<ClientGroup>> response = new ResponseObject<List<ClientGroup>>();170 public ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId) { 171 ResponseObject<ClientGroupDtoList> response = new ResponseObject<ClientGroupDtoList>(); 172 172 173 173 ClientDto client = DaoLocator.ClientDao.FindById(resourceId); 174 174 if (client != null) { 175 List<ClientGroup> groupsOfClient = new List<ClientGroup>(DaoLocator.ClientGroupDao.MemberOf(client));175 ClientGroupDtoList groupsOfClient = new ClientGroupDtoList(DaoLocator.ClientGroupDao.MemberOf(client)); 176 176 response.Obj = groupsOfClient; 177 177 response.Success = true; … … 179 179 } 180 180 else { 181 response.Obj = new List<ClientGroup>();181 response.Obj = new ClientGroupDtoList(); 182 182 response.Success = false; 183 183 response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_RESOURCE_NOT_FOUND; … … 217 217 } 218 218 #endregion 219 219 } 220 220 } -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs
r4092 r4133 184 184 } 185 185 186 public ResponseObject< List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId) {186 public ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId) { 187 187 using (contextFactory.GetContext()) { 188 188 secMan.Authorize("AccessUserGroup", sessionID, Guid.Empty); -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/HeuristicLab.Hive.Server.Core-3.3.csproj
r4121 r4133 76 76 </PropertyGroup> 77 77 <ItemGroup> 78 <Reference Include="HeuristicLab.Collections-3.3"> 79 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Collections-3.3.dll</HintPath> 80 </Reference> 81 <Reference Include="HeuristicLab.Common-3.3"> 82 <HintPath>..\..\HeuristicLab.Hive.JobBase\3.3\bin\Debug\HeuristicLab.Common-3.3.dll</HintPath> 83 </Reference> 78 84 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 79 85 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> … … 136 142 </Compile> 137 143 <Compile Include="Settings.cs" /> 138 <Compile Include="SpringTransaction.cs" />139 144 </ItemGroup> 140 145 <ItemGroup> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs
r4121 r4133 55 55 // by using the '*' as shown below: 56 56 // [assembly: AssemblyVersion("1.0.*")] 57 [assembly: AssemblyVersion("3.3.0.412 0")]58 [assembly: AssemblyFileVersion("3.3.0.412 0")]59 [assembly: AssemblyBuildDate("2010/0 7/30 13:39:26")]57 [assembly: AssemblyVersion("3.3.0.4121")] 58 [assembly: AssemblyFileVersion("3.3.0.4121")] 59 [assembly: AssemblyBuildDate("2010/08/02 17:23:55")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.DataAccess/3.3/HeuristicLab.Hive.Server.DataAccess-3.3.csproj
r4121 r4133 129 129 </ItemGroup> 130 130 <ItemGroup> 131 <Reference Include="HeuristicLab.Common-3.3"> 132 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 133 </Reference> 131 134 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 132 135 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.LINQDataAccess/3.3/HeuristicLab.Hive.Server.LINQDataAccess-3.3.csproj
r4121 r4133 77 77 </PropertyGroup> 78 78 <ItemGroup> 79 <Reference Include="HeuristicLab.Common-3.3"> 80 <HintPath>..\..\HeuristicLab.Hive.JobBase\3.3\bin\Debug\HeuristicLab.Common-3.3.dll</HintPath> 81 </Reference> 79 82 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 80 83 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive/3.3/Properties/AssemblyInfo.cs
r4121 r4133 51 51 // Revision 52 52 // 53 [assembly: AssemblyVersion("3.3.0.412 0")]54 [assembly: AssemblyFileVersion("3.3.0.412 0")]53 [assembly: AssemblyVersion("3.3.0.4121")] 54 [assembly: AssemblyFileVersion("3.3.0.4121")] -
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Security.ADODataAccess/3.3/HeuristicLab.Security.ADODataAccess-3.3.csproj
r4121 r4133 159 159 </ItemGroup> 160 160 <ItemGroup> 161 <Reference Include="HeuristicLab.Common-3.3"> 162 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath> 163 </Reference> 161 164 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 162 165 <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
Note: See TracChangeset
for help on using the changeset viewer.