Free cookie consent management tool by TermsFeed Policy Generator

Changeset 4133


Ignore:
Timestamp:
08/02/10 17:27:24 (14 years ago)
Author:
cneumuel
Message:
  • Made HiveExperiment storable, so that a running HiveExperiment can be disconnected, stored and later resumed. (#1115)
  • Added Log to each JobItem (#1115)
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  
    5757// by using the '*' as shown below:
    5858// [assembly: AssemblyVersion("1.0.*")]
    59 [assembly: AssemblyVersion("3.3.0.4111")]
    60 [assembly: AssemblyFileVersion("3.3.0.4111")]
    61 [assembly: AssemblyBuildDate("2010/07/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  
    118118  </ItemGroup>
    119119  <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>
    120126    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    121127      <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  
    44using System.Text;
    55using HeuristicLab.DataAccess.Interfaces;
     6using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    67
    78namespace HeuristicLab.DataAccess.ADOHelper {
     9  [StorableClass]
    810  public class ManyToManyRelation: PersistableObject {
     11    [Storable]
    912    public Guid Id2 { get; set; }
     13    [Storable]
     14    public IList<object> AdditionalAttributes { get; set; }
    1015
    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    }
    1226  }
    1327}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.DataAccess/3.3/HeuristicLab.DataAccess-3.3.csproj

    r4121 r4133  
    157157  </ItemGroup>
    158158  <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>
    159165    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    160166      <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  
    2525using System.Runtime.Serialization;
    2626using HeuristicLab.DataAccess.Interfaces;
     27using HeuristicLab.Common;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2729
    2830namespace HeuristicLab.DataAccess {
     31  [StorableClass]
    2932  [DataContract]
    3033  [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]
    3241    [DataMember]
    3342    public Guid Id { get; set; }
     
    4857      return this.Id.GetHashCode();
    4958    }
     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    }
    5070  }
    5171}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive 3.3.sln

    r4121 r4133  
    2727    {5010BD86-23B7-4F8C-888A-76D21AD5266A} = {5010BD86-23B7-4F8C-888A-76D21AD5266A}
    2828    {4F15BEA2-F494-4584-A0E5-6BA85377B313} = {4F15BEA2-F494-4584-A0E5-6BA85377B313}
    29     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}
    3029    {C8FEDAC1-0326-4293-B585-F0FEDDEDFC11} = {C8FEDAC1-0326-4293-B585-F0FEDDEDFC11}
    3130    {FD1AFEC2-7A79-45CF-9365-5195B04A2C9F} = {FD1AFEC2-7A79-45CF-9365-5195B04A2C9F}
     
    8988EndProject
    9089Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab", "HeuristicLab", "{BD1DE6F6-A188-4D1F-9681-BA7104818370}"
    91 EndProject
    92 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.ExtLibs", "HeuristicLab.ExtLibs", "{98B4B360-4F14-4BC5-92F2-9B81F6C712DA}"
    93 EndProject
    94 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}"
    9590EndProject
    9691Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "HeuristicLab.Hive.Test", "HeuristicLab.Hive.Test", "{4F2D8149-D608-42B3-BB1C-6909BDA2B350}"
     
    437432    {21187322-52DD-4243-80A4-A85F0263E63B}.Release|x86.ActiveCfg = Release|x86
    438433    {21187322-52DD-4243-80A4-A85F0263E63B}.Release|x86.Build.0 = Release|x86
    439     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
    440     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Any CPU.Build.0 = Debug|Any CPU
    441     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.ActiveCfg = Debug|x86
    442     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|Mixed Platforms.Build.0 = Debug|x86
    443     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.ActiveCfg = Debug|x64
    444     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x64.Build.0 = Debug|x64
    445     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x86.ActiveCfg = Debug|x86
    446     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Debug|x86.Build.0 = Debug|x86
    447     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.ActiveCfg = Release|Any CPU
    448     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Any CPU.Build.0 = Release|Any CPU
    449     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.ActiveCfg = Release|x86
    450     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|Mixed Platforms.Build.0 = Release|x86
    451     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.ActiveCfg = Release|x64
    452     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x64.Build.0 = Release|x64
    453     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.ActiveCfg = Release|x86
    454     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1}.Release|x86.Build.0 = Release|x86
    455434    {55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.ActiveCfg = Debug|x86
    456435    {55B89815-F3E7-4D09-9442-273F849141DD}.Debug|Any CPU.Build.0 = Debug|x86
     
    551530    {5CDACE54-5FB2-4344-A21C-963F63CB7C2B} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
    552531    {D17A4D6A-4CAA-4470-8A19-F42463C021FD} = {BD1DE6F6-A188-4D1F-9681-BA7104818370}
    553     {48D4AEB1-2247-4B58-8B63-20B81BF8D4B1} = {98B4B360-4F14-4BC5-92F2-9B81F6C712DA}
    554532    {55B89815-F3E7-4D09-9442-273F849141DD} = {4F2D8149-D608-42B3-BB1C-6909BDA2B350}
    555533  EndGlobalSection
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Client.Communication/3.3/HeuristicLab.Hive.Client.Communication-3.3.csproj

    r4121 r4133  
    7676  </PropertyGroup>
    7777  <ItemGroup>
     78    <Reference Include="HeuristicLab.Common-3.3">
     79      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     80    </Reference>
    7881    <Reference Include="HeuristicLab.Core-3.3">
    7982      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
    8083    </Reference>
    81     <Reference Include="HeuristicLab.DataAccess-3.3, Version=3.3.0.4091, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />
    8284    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    8385      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     
    149151  </ItemGroup>
    150152  <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>
    151157    <ProjectReference Include="..\..\HeuristicLab.Hive.Client.Common\3.3\HeuristicLab.Hive.Client.Common-3.3.csproj">
    152158      <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  
    7676  </PropertyGroup>
    7777  <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" />
    7982    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    8083      <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  
    5757// by using the '*' as shown below:
    5858// [assembly: AssemblyVersion("1.0.*")]
    59 [assembly: AssemblyVersion("3.3.0.4120")]
    60 [assembly: AssemblyFileVersion("3.3.0.4120")]
    61 [assembly: AssemblyBuildDate("2010/07/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  
    7979      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
    8080    </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" />
    8282    <Reference Include="HeuristicLab.Persistence-3.3">
    8383      <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  
    55using System.Runtime.Serialization;
    66using HeuristicLab.DataAccess;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    78
    89namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    910 
     11  [StorableClass]
    1012  [DataContract]
    1113  public class AppointmentDto: PersistableObject {
     14    [Storable]
    1215    [DataMember]
    1316    public DateTime StartDate { get; set; }
     17    [Storable]
    1418    [DataMember]
    1519    public DateTime EndDate { get; set; }
     20    [Storable]
    1621    [DataMember]
    1722    public bool AllDayEvent { get; set; }
     23    [Storable]
    1824    [DataMember]
    1925    public bool Recurring { get; set; }
     26    [Storable]
    2027    [DataMember]
    2128    public Guid RecurringId { get; set; }
     29    [Storable]
    2230    [DataMember]
    2331    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    }
    2443  }
    2544}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/CachedHivePluginInfoDto.cs

    r4042 r4133  
    2323using System.Collections.Generic;
    2424using System.Text;
     25using System.Linq;
    2526using HeuristicLab.Hive.Contracts.BusinessObjects;
    2627using System.Runtime.Serialization;
    2728using HeuristicLab.PluginInfrastructure.Manager;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.PluginInfrastructure {
     32  [StorableClass]
    3033  [DataContract]
    3134  [Serializable]
     
    3538    /// stores the plugin files in a list of byte arrays
    3639    /// </summary>
     40    [Storable]
    3741    [DataMember]
    3842    public List<HivePluginFile> PluginFiles { get; set; }
     
    4145      PluginFiles = new List<HivePluginFile>();
    4246    }
     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    }
    4354  }
    4455}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientConfigDto.cs

    r3011 r4133  
    2626using System.Runtime.Serialization;
    2727using HeuristicLab.DataAccess;
     28using HeuristicLab.Common;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    30 
     32  [StorableClass]
    3133  [DataContract]
    3234  [Serializable]
    33   public class ClientConfigDto : PersistableObject {
     35  public class ClientConfigDto : PersistableObject, IDeepCloneable {
     36    [Storable]
    3437    [DataMember]
    3538    public String UpDownTimeCalendar { get; set; }
     39    [Storable]
    3640    [DataMember]
    3741    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    }
    3849  }
    3950}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientDto.cs

    r4116 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Common;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2729                                   
    2830namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     
    3133  public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch };
    3234
     35  [StorableClass]
    3336  [DataContract]
    3437  [Serializable]
    3538  public class ClientDto : ResourceDto {
     39    [Storable]
    3640    [DataMember]
    3741    public int NrOfCores { get; set; }
     42    [Storable]
    3843    [DataMember]
    3944    public int NrOfFreeCores { get; set; }
     45    [Storable]
    4046    [DataMember]
    4147    public int? CpuSpeedPerCore { get; set; }
     48    [Storable]
    4249    [DataMember]
    4350    public int Memory { get; set; }
     51    [Storable]
    4452    [DataMember]
    4553    public int FreeMemory { get; set; }
     54    [Storable]
    4655    [DataMember]
    4756    public DateTime? Login { get; set; }
     57    [Storable]
    4858    [DataMember]
    4959    public State State { get; set; }
     60    [Storable]
    5061    [DataMember]
    5162    public CalendarState CalendarSyncStatus { get; set; }
     63    [Storable]
    5264    [DataMember]
    5365    public ClientConfigDto Config { get; set; }
     
    5668      return base.ToString() + ", NrOfCores: " + NrOfCores + ", NrOfFreeCores " + NrOfFreeCores + ", Login: " + Login + ", State: " + State;
    5769    }
     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    }
    5884  }
    5985}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ClientGroupDto.cs

    r3011 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2728
    2829namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    2930
     31  [StorableClass]
    3032  [DataContract]
    3133  public class ClientGroupDto : ResourceDto {
     34    [Storable]
    3235    [DataMember]
    3336    public List<ResourceDto> Resources { get; set; }
     
    3639      Resources = new List<ResourceDto>();
    3740    }
     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    }
    3848  }
    3949}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginFile.cs

    r4042 r4133  
    44using System.Text;
    55using System.Runtime.Serialization;
     6using HeuristicLab.Common;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    68
    79namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     10  [StorableClass]
    811  [Serializable]
    912  [DataContract]
    10   public class HivePluginFile {
     13  public class HivePluginFile : IDeepCloneable {
     14    [Storable]
    1115    [DataMember]
    1216    public byte[] BinaryFile { get; set; }
     17    [Storable]
    1318    [DataMember]
    1419    public String Name { get; set; } 
     
    1823      Name = name;
    1924    }
     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    }
    2040  }
    2141}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/HivePluginInfoDto.cs

    r4119 r4133  
    2727using HeuristicLab.DataAccess;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    3031namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    31 
     32  [StorableClass]
    3233  [DataContract]
    3334  [Serializable]
    3435  public class HivePluginInfoDto : PersistableObject {
     36    [Storable]
    3537    [DataMember]
    3638    public String Name { get; set; }
     
    3941    public Version Version { get; set; }
    4042
     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    }
    4168  }
    4269}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobDto.cs

    r3578 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Common;
    2728using HeuristicLab.DataAccess;
    2829using HeuristicLab.PluginInfrastructure;
     30using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2931
    3032namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    3133
     34  [StorableClass]
    3235  [DataContract]
    3336  [Serializable]
    3437  public class JobDto : PersistableObject {
     38    [Storable]
    3539    [DataMember]
    3640    public State State { get; set; }
     41    [Storable]
    3742    [DataMember]
    3843    public Guid UserId { get; set; }
     44    [Storable]
    3945    [DataMember]
    4046    public ClientDto Client { get; set; }
     47    [Storable]
    4148    [DataMember]
    4249    public JobDto ParentJob { get; set; }
     50    [Storable]
    4351    [DataMember]
    4452    public double? Percentage { get; set; }
     53    [Storable]
    4554    [DataMember]
    4655    public DateTime? DateCreated { get; set; }
     56    [Storable]
    4757    [DataMember]
    4858    public DateTime? DateCalculated { get; set; }
     59    [Storable]
    4960    [DataMember]
    5061    public DateTime? DateFinished { get; set; }
     62    [Storable]
    5163    [DataMember]
    5264    public int Priority { get; set; }
     65    [Storable]
    5366    [DataMember]
    5467    public int CoresNeeded { get; set; }
     68    [Storable]
    5569    [DataMember]
    5670    public int MemoryNeeded { get; set; }
     71    [Storable]
    5772    [DataMember]
    5873    public List<HivePluginInfoDto> PluginsNeeded { get; set; }
     74    [Storable]
    5975    [DataMember]
    6076    public List<Guid> AssignedResourceIds { get; set; }
     77    [Storable]
    6178    [DataMember]
    6279    public ProjectDto Project { get; set; }
     
    7188      AssignedResourceIds = new List<Guid>();
    7289    }
     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    }
    73112  }
    74113}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/JobResult.cs

    r2099 r4133  
    2626using System.Runtime.Serialization;
    2727using HeuristicLab.DataAccess;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    3031
     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]
    3135  [DataContract]
    3236  [Serializable]
    3337  public class JobResult : PersistableObject {
     38    [Storable]
    3439    [DataMember]
    3540    public Guid JobId { get; set; }
     41    [Storable]
    3642    [DataMember]
    3743    public double Percentage { get; set; }
     44    [Storable]
    3845    [DataMember]
    3946    public DateTime Timestamp { get; set; }
     47    [Storable]
    4048    [DataMember]
    4149    public Guid ClientId { get; set; }
     50    [Storable]
    4251    [DataMember]
    4352    public Exception Exception { get; set; }
     53    [Storable]
    4454    [DataMember]
    4555    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    }
    4668  }
    4769}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ProjectDto.cs

    r3011 r4133  
    2727using HeuristicLab.DataAccess;
    2828using HeuristicLab.PluginInfrastructure;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2930
    3031namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    31 
     32  [StorableClass]
    3233  [DataContract]
    3334  [Serializable]
    3435  public class ProjectDto : PersistableObject {
     36    [Storable]
    3537    [DataMember]
    3638    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    }
    3745  }
    3846}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/ResourceDto.cs

    r3011 r4133  
    2626using System.Runtime.Serialization;
    2727using HeuristicLab.DataAccess;
     28using HeuristicLab.Common;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2830
    2931namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    30 
     32  [StorableClass]
    3133  [DataContract]
    3234  [Serializable]
    33   public class ResourceDto : PersistableObject {
     35  public class ResourceDto : PersistableObject, IDeepCloneable {
     36    [Storable]
    3437    [DataMember]
    3538    public string Name { get; set; }
     
    3841      return Id + " " + Name;
    3942    }
     43
     44    public virtual IDeepCloneable Clone(Cloner cloner) {
     45      ResourceDto clone = (ResourceDto)base.Clone(cloner);
     46      clone.Name = this.Name;
     47      return clone;
     48    }
    4049  }
    4150}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJob.cs

    r3011 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2729
    2830namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     31  [StorableClass]
    2932  [DataContract]
    3033  [Serializable]
    31   public class SerializedJob {
     34  public class SerializedJob : IDeepCloneable {
     35    [Storable]
    3236    [DataMember]
    3337    public JobDto JobInfo { get; set; }
    34    
     38    [Storable]
    3539    [DataMember]
    3640    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    }
    3754  }
    3855}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/SerializedJobResult.cs

    r2099 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2729
    2830namespace HeuristicLab.Hive.Contracts.BusinessObjects {
     31  [StorableClass]
    2932  [DataContract]
    3033  [Serializable]
    31   public class SerializedJobResult {
     34  public class SerializedJobResult : IDeepCloneable {
     35    [Storable]
    3236    [DataMember]
    3337    public JobResult JobResult { get; set; }
    34 
     38    [Storable]
    3539    [DataMember]
    3640    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    }
    3754  }
    3855}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/BusinessObjects/UpTimeStatisticsDto.cs

    r3011 r4133  
    2626using System.Runtime.Serialization;
    2727using HeuristicLab.DataAccess;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    3031
     32  [StorableClass]
    3133  [DataContract]
    3234  public class UpTimeStatisticsDto : PersistableObject {
     35    [Storable]
    3336    [DataMember]
    3437    public ClientDto Client { get; set; }
     38    [Storable]
    3539    [DataMember]
    3640    public DateTime Login { get; set; }
     41    [Storable]
    3742    [DataMember]
    3843    public DateTime Logout { get; set; }
    3944
     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    }
    4052  }
    4153}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/HeuristicLab.Hive.Contracts-3.3.csproj

    r4121 r4133  
    7676  </PropertyGroup>
    7777  <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>
    7890    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    7991      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     
    119131    <Compile Include="BusinessObjects\ClientDto.cs" />
    120132    <Compile Include="BusinessObjects\ClientConfigDto.cs" />
     133    <Compile Include="BusinessObjects\ClientGroupDtoList.cs" />
    121134    <Compile Include="RecurrentEvent.cs" />
    122135    <Compile Include="ResponseCalendar.cs" />
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Interfaces/IClientManager.cs

    r3203 r4133  
    4141    ResponseList<ClientGroupDto> GetAllClientGroups();
    4242    [OperationContract]
    43     ResponseObject<List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId);
     43    ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId);
    4444    [OperationContract]
    4545    ResponseObject<ClientGroupDto> AddClientGroup(ClientGroupDto clientGroup);
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/MessageContainer.cs

    r3203 r4133  
    2424using System.Linq;
    2525using System.Text;
     26using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     27using HeuristicLab.Common;
    2628
    2729namespace HeuristicLab.Hive.Contracts {
     
    3032  /// the actual message itself and the JobId, refered by the message
    3133  /// </summary>
     34  [StorableClass]
    3235  [Serializable]
    33   public class MessageContainer {
     36  public class MessageContainer : IDeepCloneable {
    3437
    3538    public enum MessageType { FetchJob, AbortJob, JobAborted, RequestSnapshot, FinishedJob, NoMessage, SnapshotReady, Shutdown, JobFailed, UptimeLimitDisconnect,
     
    3740    };
    3841
     42    [Storable]
    3943    public MessageType Message { get; set; }
     44    [Storable]
    4045    public Guid JobId { get; set; }
    4146
     
    4449      JobId = Guid.Empty;
    4550    }
     51
    4652    public MessageContainer(MessageType message, Guid jobId) {
    4753      Message = message;
     
    4955    }
    5056
     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    }
    5168  }
    5269}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/Response.cs

    r1939 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2729
    2830namespace HeuristicLab.Hive.Contracts {
     
    3032  /// Server response class
    3133  /// </summary>
     34  [StorableClass]
    3235  [DataContract]
    3336  [Serializable]
    34   public class Response {
     37  public class Response : IDeepCloneable {
     38    [Storable]
    3539    [DataMember]
    3640    public bool Success { get; set; }
     41    [Storable]
    3742    [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    }
    3956  }
    4057}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseCalendar.cs

    r3203 r4133  
    55using System.Runtime.Serialization;
    66using HeuristicLab.Hive.Contracts.BusinessObjects;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    78
    89namespace HeuristicLab.Hive.Contracts {
    9   public class ResponseCalendar: Response {
     10  [StorableClass]
     11  public class ResponseCalendar : Response {
     12    [Storable]
    1013    [DataMember]
    1114    public bool ForceFetch { get; set; }
     15    [Storable]
    1216    [DataMember]
    1317    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    }
    1426  }
    1527}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseHB.cs

    r1530 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2728
    2829namespace HeuristicLab.Hive.Contracts {
     
    3334  /// Return value to hearbeats sent by the client
    3435  /// </summary>
     36  [StorableClass]
    3537  [DataContract]
    3638  public class ResponseHB : Response {
     39    [Storable]
    3740    [DataMember]
    3841    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    }
    3949  }
    4050}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseJob.cs

    r3011 r4133  
    2626using HeuristicLab.Hive.Contracts.BusinessObjects;
    2727using System.Runtime.Serialization;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Hive.Contracts {
     
    3334  /// If a client pulls a Job from the server he gets a ResponseJob as answer
    3435  /// </summary>
     36  [StorableClass]
    3537  [DataContract]
    3638  [Serializable]
    3739  public class ResponseJob : Response {
     40    [Storable]
    3841    [DataMember]
    3942    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    }
    4049  }
    4150}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseList.cs

    r1530 r4133  
    2727using System.ServiceModel;
    2828using HeuristicLab.Hive.Contracts.BusinessObjects;
     29using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HeuristicLab.Common;
    2931
    3032namespace HeuristicLab.Hive.Contracts {
    31 
     33  [StorableClass]
    3234  [DataContract]
    33   public class ResponseList<T> : Response {
     35  public class ResponseList<T> : Response
     36    where T : IDeepCloneable {
     37    [Storable]
    3438    [DataMember]
    3539    public IList<T> List { get; set; }
    3640
     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    }
    3747  }
    3848}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseObject.cs

    r1530 r4133  
    2525using System.Text;
    2626using System.Runtime.Serialization;
     27using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     28using HeuristicLab.Common;
    2729
    2830namespace HeuristicLab.Hive.Contracts {
    29 
     31  [StorableClass]
    3032  [DataContract]
    31   public class ResponseObject<T> : Response {
     33  public class ResponseObject<T> : Response
     34    where T : IDeepCloneable {
     35    [Storable]
    3236    [DataMember]
    3337    public T Obj { get; set; }
    3438
     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    }
    3544  }
    3645}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponsePlugin.cs

    r3011 r4133  
    55using System.Runtime.Serialization;
    66using HeuristicLab.PluginInfrastructure;
     7using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    78
    89namespace HeuristicLab.Hive.Contracts {
    9 
     10  [StorableClass]
    1011  [DataContract]
    1112  [Serializable]
    1213  public class ResponsePlugin : Response {
     14    [Storable]
     15    [DataMember]
     16    public List<CachedHivePluginInfoDto> Plugins { get; set; }
     17
    1318    public ResponsePlugin() {
    1419      Plugins = new List<CachedHivePluginInfoDto>();
    1520    }
    1621
    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    }
    1928  }
    2029}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseResultReceived.cs

    r3011 r4133  
    2626using System.Runtime.Serialization;
    2727using HeuristicLab.Hive.Contracts.BusinessObjects;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Hive.Contracts {
     31  [StorableClass]
    3032  [DataContract]
    3133  public class ResponseResultReceived : Response {
     34    [Storable]
    3235    [DataMember]
    3336    public Guid JobId { get; set; }
     37    [Storable]
    3438    [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    }
    3647  }
    3748}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Contracts/3.3/ResponseSerializedJob.cs

    r2117 r4133  
    2626using HeuristicLab.Hive.Contracts.BusinessObjects;
    2727using System.Runtime.Serialization;
     28using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
    2829
    2930namespace HeuristicLab.Hive.Contracts {
     
    3334  /// If a client pulls a Job from the server he gets a ResponseJob as answer
    3435  /// </summary>
     36  [StorableClass]
    3537  [DataContract]
    3638  [Serializable]
    3739  public class ResponseSerializedJob : Response {
     40    [Storable]
    3841    [DataMember]
    3942    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    }
    4049  }
    4150}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Engine/3.3/HeuristicLab.Hive.Engine-3.3.csproj

    r4121 r4133  
    9797      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Core-3.3.dll</HintPath>
    9898    </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" />
    102102    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    103103      <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  
    7373      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Data-3.3.dll</HintPath>
    7474    </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>
    7875    <Reference Include="HeuristicLab.MainForm-3.3">
    7976      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.MainForm-3.3.dll</HintPath>
     
    9188      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Optimization.Views-3.3.dll</HintPath>
    9289    </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">
    9491      <SpecificVersion>False</SpecificVersion>
    9592    </Reference>
     
    128125    </Compile>
    129126    <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>
    130132  </ItemGroup>
    131133  <ItemGroup>
     
    134136  </ItemGroup>
    135137  <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>
    136142    <ProjectReference Include="..\..\HeuristicLab.Hive.Contracts\3.3\HeuristicLab.Hive.Contracts-3.3.csproj">
    137143      <Project>{134F93D7-E7C8-4ECD-9923-7F63259A60D8}</Project>
     
    154160      <DependentUpon>JobItemView.cs</DependentUpon>
    155161    </EmbeddedResource>
     162    <EmbeddedResource Include="Properties\Resources.resx">
     163      <Generator>ResXFileCodeGenerator</Generator>
     164      <LastGenOutput>Resources.Designer.cs</LastGenOutput>
     165    </EmbeddedResource>
    156166  </ItemGroup>
    157167  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.Designer.cs

    r4120 r4133  
    6666      this.serverUrlTextBox = new System.Windows.Forms.TextBox();
    6767      this.resourceIdsTextBox = new System.Windows.Forms.TextBox();
     68      this.disconnectButton = new System.Windows.Forms.Button();
     69      this.reconnectButton = new System.Windows.Forms.Button();
    6870      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).BeginInit();
    6971      this.tabControl.SuspendLayout();
     
    308310      this.resourceIdsTextBox.Validated += new System.EventHandler(this.resourceIdsTextBox_Validated);
    309311      //
     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      //
    310338      // HiveExperimentView
    311339      //
    312340      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    313341      this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
     342      this.Controls.Add(this.reconnectButton);
     343      this.Controls.Add(this.disconnectButton);
    314344      this.Controls.Add(this.resourceIdsTextBox);
    315345      this.Controls.Add(this.serverUrlTextBox);
     
    340370      this.Controls.SetChildIndex(this.serverUrlTextBox, 0);
    341371      this.Controls.SetChildIndex(this.resourceIdsTextBox, 0);
     372      this.Controls.SetChildIndex(this.disconnectButton, 0);
     373      this.Controls.SetChildIndex(this.reconnectButton, 0);
    342374      ((System.ComponentModel.ISupportInitialize)(this.errorProvider)).EndInit();
    343375      this.tabControl.ResumeLayout(false);
     
    371403    private Core.Views.LogView logView;
    372404    private JobItemListView jobListView;
     405    private System.Windows.Forms.Button disconnectButton;
     406    private System.Windows.Forms.Button reconnectButton;
    373407
    374408  }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.cs

    r4120 r4133  
    5858      Content.Stopped -= new EventHandler(Content_Stopped);
    5959      Content.ExperimentChanged -= new EventHandler(Content_ExperimentChanged);
     60      Content.IsResultsPollingChanged -= new EventHandler(Content_IsResultsPollingChanged);
    6061      base.DeregisterContentEvents();
    6162    }
     63
    6264    protected override void RegisterContentEvents() {
    6365      base.RegisterContentEvents();
     
    6971      Content.Paused += new EventHandler(Content_Paused);
    7072      Content.Stopped += new EventHandler(Content_Stopped);
     73      Content.IsResultsPollingChanged += new EventHandler(Content_IsResultsPollingChanged);
    7174      Content.ExperimentChanged += new EventHandler(Content_ExperimentChanged);
    7275    }
     
    130133      else {
    131134        nameTextBox.Enabled = descriptionTextBox.Enabled = false;
    132         Locked = true;
    133135        SetEnabledStateOfExecutableButtons();
    134136      }
     
    139141      else {
    140142        nameTextBox.Enabled = descriptionTextBox.Enabled = true;
    141         Locked = false;
    142143        SetEnabledStateOfExecutableButtons();
    143144      }
     
    164165        ErrorHandling.ShowErrorDialog(this, e.Value);
    165166    }
     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    }
    166174    #endregion
    167175
     
    179187      Content.Prepare();
    180188    }
    181     #endregion
    182 
    183     #region Helpers
    184     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 now
    191         stopButton.Enabled = (Content.ExecutionState == ExecutionState.Started) || (Content.ExecutionState == ExecutionState.Paused);
    192         resetButton.Enabled = Content.ExecutionState != ExecutionState.Started;
    193        
    194       }
    195     }
    196     #endregion
    197189
    198190    private void serverUrlTextBox_Validating(object sender, System.ComponentModel.CancelEventArgs e) {
     
    235227    }
    236228
     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
    237260  }
    238261}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/HiveExperimentView.resx

    r4120 r4133  
    121121    <value>102, 17</value>
    122122  </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>
    123126  <metadata name="toolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    124127    <value>17, 17</value>
     
    128131    <value>
    129132        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
    130         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALCAAA
    131         CwgBwL2l2gAAALZJREFUOE9j/P//PwNFAGQAOi7bn+2GTRybGIZmkKKEGRH/iTUEpwGWZfpEGYLVgKgp
     133        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA
     134        CwYBZDTpJAAAALZJREFUOE9j/P//PwNFAGQAOi7bn+2GTRybGIZmkKKEGRH/iTUEpwGWZfpEGYLVgKgp
    132135        Qf833Fr8nxhDsBoQPMEbZDtRhmA1wKfLGWwACEctCsDrEqwGODZb/M/YEAvWbNus/1+nWOG/RBo3iFZD
    133136        jwmsBpjX6KFo5k9gwaoZnIawxa1eqTLcZnyacRqgki8FdjYhzTgNkM4QJEozTgNEkjlx+pmoQMQW2rjy
     
    138141    <value>
    139142        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
    140         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALCAAA
    141         CwgBwL2l2gAAAXJJREFUOE+tkj1IQmEYhWsoaIi2xmhpiYSgKFoiCMLJJYSEJiEI0mgIyqjA6vaLUKIU
     143        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA
     144        CwYBZDTpJAAAAXJJREFUOE+tkj1IQmEYhWsoaIi2xmhpiYSgKFoiCMLJJYSEJiEI0mgIyqjA6vaLUKIU
    142145        iZlJKKUoWEbZDzVYCYlQYVxcNDIoRND8ud7idD83C27g7YNvPM8573nfcgBlgh4BCPmCxIX0Qtx/ATTu
    143146        Lyy78ph3ZKC2pTBlSWB86w2jhleMrD9jWB9N/jQsSkDEj5FPPERZ+J7yOL5j4PYzsPsYGL1piKR7nL64
     
    151154    <value>
    152155        iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8
    153         YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALCAAA
    154         CwgBwL2l2gAAAYNJREFUOE9j/P//PwNFAGQAJZgizWDXI9veu/nvfxhuW/vtf+OKz/9rF7//XzHv1f+S
     156        YQUAAAAgY0hSTQAAeiYAAICEAAD6AAAAgOgAAHUwAADqYAAAOpgAABdwnLpRPAAAAAlwSFlzAAALBgAA
     157        CwYBZDTpJAAAAYNJREFUOE9j/P//PwNFAGQAJZgizWDXI9veu/nvfxhuW/vtf+OKz/9rF7//XzHv1f+S
    155158        2c//F0x//L901mOgFoSrUQzo2vDr/6aT3/6vPPTl/4I9n/5ffvDzf+/ad/+bl74BG5I3/cV/3dBVuA0A
    156159        2bri4Jf/83Z9+n/ryS+Qwv8NS978L5378n/O1Of/k3qf/Vf1W4TbAJCT5+z49P/hyx9gzSBQMvvl/6wp
     
    164167    <value>
    165168        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
    168191        SPPVh3/+64auAqr9z4DOJ2hA29pv/289/f1f1W8R2AB0PkEDGld8/n/54e//cm6zwAag8wkaULv4/f8T
    169192        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  
    5454      this.jobStatusGroupBox = new System.Windows.Forms.GroupBox();
    5555      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();
    5660      this.snapshotGroupBox.SuspendLayout();
    5761      this.jobStatusGroupBox.SuspendLayout();
     62      this.tabControl.SuspendLayout();
     63      this.detailsTabPage.SuspendLayout();
     64      this.logTabPage.SuspendLayout();
    5865      this.SuspendLayout();
    5966      //
     
    7077      //
    7178      this.userIdLabel.AutoSize = true;
    72       this.userIdLabel.Location = new System.Drawing.Point(4, 3);
     79      this.userIdLabel.Location = new System.Drawing.Point(3, 3);
    7380      this.userIdLabel.Name = "userIdLabel";
    7481      this.userIdLabel.Size = new System.Drawing.Size(41, 13);
     
    8289      this.stateTextBox.Location = new System.Drawing.Point(95, 19);
    8390      this.stateTextBox.Name = "stateTextBox";
    84       this.stateTextBox.Size = new System.Drawing.Size(395, 20);
     91      this.stateTextBox.Size = new System.Drawing.Size(432, 20);
    8592      this.stateTextBox.TabIndex = 2;
    8693      //
     
    8996      this.userIdTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    9097                  | System.Windows.Forms.AnchorStyles.Right)));
    91       this.userIdTextBox.Location = new System.Drawing.Point(92, 3);
     98      this.userIdTextBox.Location = new System.Drawing.Point(91, 3);
    9299      this.userIdTextBox.Name = "userIdTextBox";
    93       this.userIdTextBox.Size = new System.Drawing.Size(411, 20);
     100      this.userIdTextBox.Size = new System.Drawing.Size(448, 20);
    94101      this.userIdTextBox.TabIndex = 3;
    95102      //
     
    107114      this.dateCreatedTextBox.Location = new System.Drawing.Point(95, 63);
    108115      this.dateCreatedTextBox.Name = "dateCreatedTextBox";
    109       this.dateCreatedTextBox.Size = new System.Drawing.Size(395, 20);
     116      this.dateCreatedTextBox.Size = new System.Drawing.Size(432, 20);
    110117      this.dateCreatedTextBox.TabIndex = 5;
    111118      //
     
    116123      this.dateFinishedTextBox.Location = new System.Drawing.Point(95, 107);
    117124      this.dateFinishedTextBox.Name = "dateFinishedTextBox";
    118       this.dateFinishedTextBox.Size = new System.Drawing.Size(395, 20);
     125      this.dateFinishedTextBox.Size = new System.Drawing.Size(432, 20);
    119126      this.dateFinishedTextBox.TabIndex = 6;
    120127      //
     
    123130      this.priorityTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    124131                  | System.Windows.Forms.AnchorStyles.Right)));
    125       this.priorityTextBox.Location = new System.Drawing.Point(92, 25);
     132      this.priorityTextBox.Location = new System.Drawing.Point(91, 25);
    126133      this.priorityTextBox.Name = "priorityTextBox";
    127       this.priorityTextBox.Size = new System.Drawing.Size(411, 20);
     134      this.priorityTextBox.Size = new System.Drawing.Size(448, 20);
    128135      this.priorityTextBox.TabIndex = 7;
    129136      //
     
    132139      this.coresNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    133140                  | System.Windows.Forms.AnchorStyles.Right)));
    134       this.coresNeededTextBox.Location = new System.Drawing.Point(92, 47);
     141      this.coresNeededTextBox.Location = new System.Drawing.Point(91, 47);
    135142      this.coresNeededTextBox.Name = "coresNeededTextBox";
    136       this.coresNeededTextBox.Size = new System.Drawing.Size(411, 20);
     143      this.coresNeededTextBox.Size = new System.Drawing.Size(448, 20);
    137144      this.coresNeededTextBox.TabIndex = 8;
    138145      //
     
    141148      this.memoryNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    142149                  | System.Windows.Forms.AnchorStyles.Right)));
    143       this.memoryNeededTextBox.Location = new System.Drawing.Point(92, 69);
     150      this.memoryNeededTextBox.Location = new System.Drawing.Point(91, 69);
    144151      this.memoryNeededTextBox.Name = "memoryNeededTextBox";
    145       this.memoryNeededTextBox.Size = new System.Drawing.Size(411, 20);
     152      this.memoryNeededTextBox.Size = new System.Drawing.Size(448, 20);
    146153      this.memoryNeededTextBox.TabIndex = 9;
    147154      //
     
    150157      this.pluginsNeededTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    151158                  | System.Windows.Forms.AnchorStyles.Right)));
    152       this.pluginsNeededTextBox.Location = new System.Drawing.Point(92, 91);
     159      this.pluginsNeededTextBox.Location = new System.Drawing.Point(91, 91);
    153160      this.pluginsNeededTextBox.Name = "pluginsNeededTextBox";
    154       this.pluginsNeededTextBox.Size = new System.Drawing.Size(411, 20);
     161      this.pluginsNeededTextBox.Size = new System.Drawing.Size(448, 20);
    155162      this.pluginsNeededTextBox.TabIndex = 10;
    156163      //
     
    159166      this.projectTextBox.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
    160167                  | System.Windows.Forms.AnchorStyles.Right)));
    161       this.projectTextBox.Location = new System.Drawing.Point(92, 113);
     168      this.projectTextBox.Location = new System.Drawing.Point(91, 113);
    162169      this.projectTextBox.Name = "projectTextBox";
    163       this.projectTextBox.Size = new System.Drawing.Size(411, 20);
     170      this.projectTextBox.Size = new System.Drawing.Size(448, 20);
    164171      this.projectTextBox.TabIndex = 11;
    165172      //
     
    194201      //
    195202      this.priorityLabel.AutoSize = true;
    196       this.priorityLabel.Location = new System.Drawing.Point(4, 25);
     203      this.priorityLabel.Location = new System.Drawing.Point(3, 25);
    197204      this.priorityLabel.Name = "priorityLabel";
    198205      this.priorityLabel.Size = new System.Drawing.Size(41, 13);
     
    203210      //
    204211      this.coresNeededLabel.AutoSize = true;
    205       this.coresNeededLabel.Location = new System.Drawing.Point(4, 47);
     212      this.coresNeededLabel.Location = new System.Drawing.Point(3, 47);
    206213      this.coresNeededLabel.Name = "coresNeededLabel";
    207214      this.coresNeededLabel.Size = new System.Drawing.Size(75, 13);
     
    212219      //
    213220      this.memoryNeededLabel.AutoSize = true;
    214       this.memoryNeededLabel.Location = new System.Drawing.Point(4, 69);
     221      this.memoryNeededLabel.Location = new System.Drawing.Point(3, 69);
    215222      this.memoryNeededLabel.Name = "memoryNeededLabel";
    216223      this.memoryNeededLabel.Size = new System.Drawing.Size(85, 13);
     
    221228      //
    222229      this.pluginsNeededLabel.AutoSize = true;
    223       this.pluginsNeededLabel.Location = new System.Drawing.Point(4, 91);
     230      this.pluginsNeededLabel.Location = new System.Drawing.Point(3, 91);
    224231      this.pluginsNeededLabel.Name = "pluginsNeededLabel";
    225232      this.pluginsNeededLabel.Size = new System.Drawing.Size(82, 13);
     
    230237      //
    231238      this.projectLabel.AutoSize = true;
    232       this.projectLabel.Location = new System.Drawing.Point(4, 113);
     239      this.projectLabel.Location = new System.Drawing.Point(3, 113);
    233240      this.projectLabel.Name = "projectLabel";
    234241      this.projectLabel.Size = new System.Drawing.Size(43, 13);
     
    245252      this.snapshotGroupBox.Controls.Add(this.snapshotTimeLabel);
    246253      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);
    248255      this.snapshotGroupBox.Name = "snapshotGroupBox";
    249       this.snapshotGroupBox.Size = new System.Drawing.Size(496, 100);
     256      this.snapshotGroupBox.Size = new System.Drawing.Size(533, 100);
    250257      this.snapshotGroupBox.TabIndex = 21;
    251258      this.snapshotGroupBox.TabStop = false;
     
    255262      //
    256263      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);
    258265      this.openSnapshotButton.Name = "openSnapshotButton";
    259266      this.openSnapshotButton.Size = new System.Drawing.Size(101, 26);
     
    269276      this.snapshotTimeText.Location = new System.Drawing.Point(45, 41);
    270277      this.snapshotTimeText.Name = "snapshotTimeText";
    271       this.snapshotTimeText.Size = new System.Drawing.Size(445, 20);
     278      this.snapshotTimeText.Size = new System.Drawing.Size(482, 20);
    272279      this.snapshotTimeText.TabIndex = 24;
    273280      //
     
    278285      this.snapshotStatusText.Location = new System.Drawing.Point(45, 19);
    279286      this.snapshotStatusText.Name = "snapshotStatusText";
    280       this.snapshotStatusText.Size = new System.Drawing.Size(445, 20);
     287      this.snapshotStatusText.Size = new System.Drawing.Size(482, 20);
    281288      this.snapshotStatusText.TabIndex = 23;
    282289      //
     
    305312      this.dateCalculatedText.Location = new System.Drawing.Point(95, 85);
    306313      this.dateCalculatedText.Name = "dateCalculatedText";
    307       this.dateCalculatedText.Size = new System.Drawing.Size(395, 20);
     314      this.dateCalculatedText.Size = new System.Drawing.Size(432, 20);
    308315      this.dateCalculatedText.TabIndex = 22;
    309316      //
     
    332339      this.jobStatusGroupBox.Controls.Add(this.dateCreatedLabel);
    333340      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);
    335342      this.jobStatusGroupBox.Name = "jobStatusGroupBox";
    336       this.jobStatusGroupBox.Size = new System.Drawing.Size(496, 134);
     343      this.jobStatusGroupBox.Size = new System.Drawing.Size(533, 134);
    337344      this.jobStatusGroupBox.TabIndex = 24;
    338345      this.jobStatusGroupBox.TabStop = false;
     
    345352      this.percentageProgressBar.Location = new System.Drawing.Point(153, 41);
    346353      this.percentageProgressBar.Name = "percentageProgressBar";
    347       this.percentageProgressBar.Size = new System.Drawing.Size(337, 20);
     354      this.percentageProgressBar.Size = new System.Drawing.Size(374, 20);
    348355      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;
    349417      //
    350418      // JobItemView
     
    352420      this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
    353421      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);
    368423      this.Name = "JobItemView";
    369       this.Size = new System.Drawing.Size(506, 409);
     424      this.Size = new System.Drawing.Size(556, 485);
    370425      this.snapshotGroupBox.ResumeLayout(false);
    371426      this.snapshotGroupBox.PerformLayout();
    372427      this.jobStatusGroupBox.ResumeLayout(false);
    373428      this.jobStatusGroupBox.PerformLayout();
     429      this.tabControl.ResumeLayout(false);
     430      this.detailsTabPage.ResumeLayout(false);
     431      this.detailsTabPage.PerformLayout();
     432      this.logTabPage.ResumeLayout(false);
    374433      this.ResumeLayout(false);
    375       this.PerformLayout();
    376434
    377435    }
     
    409467    private System.Windows.Forms.GroupBox jobStatusGroupBox;
    410468    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;
    411473  }
    412474}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/JobItemView.cs

    r4121 r4133  
    3434      base.OnContentChanged();
    3535      if (Content != null) {
     36        logView.Content = Content.Log;
    3637        Content_JobDtoChanged(this, EventArgs.Empty);
    3738        if (Content.LatestSnapshot != null) {
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment.Views/3.3/Properties/AssemblyInfo.cs

    r4121 r4133  
    5555// You can specify all the values or you can default the Revision and Build Numbers
    5656// by using the '*' as shown below:
    57 [assembly: AssemblyVersion("3.3.0.4120")]
    58 [assembly: AssemblyFileVersion("3.3.0.4120")]
    59 [assembly: AssemblyBuildDate("2010/07/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  
    8585      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
    8686    </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" />
    8888    <Reference Include="System" />
    8989    <Reference Include="System.Core" />
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/HiveExperiment.cs

    r4121 r4133  
    5353    private const string itemDescription = "An experiment which contains multiple batch runs of algorithms which are executed in the Hive.";
    5454    private const int resultPollingIntervalMs = 15000;
    55 
     55    private const int maxSnapshotRetries = 20;
    5656    private object locker = new object();
    57     private const int maxSnapshotRetries = 20;
     57
    5858    private System.Timers.Timer timer;
    5959    private bool pausePending, stopPending;
     60
     61    [Storable]
    6062    private DateTime lastUpdateTime;
    6163
     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   
    6279    [Storable]
    6380    private IDictionary<Guid, IOptimizer> pendingOptimizers = new Dictionary<Guid, IOptimizer>();
     
    6885      get { return jobItems; }
    6986    }
    70    
     87
    7188
    7289    [Storable]
     
    7693      set {
    7794        if (serverUrl != value) {
    78           serverUrl = value; 
     95          serverUrl = value;
    7996          OnServerUrlChanged();
    8097        }
     
    88105      set {
    89106        if (resourceIds != value) {
    90           resourceIds = value; 
     107          resourceIds = value;
    91108          OnResourceIdsChanged();
    92109        }
     
    115132    public HiveExperiment(bool deserializing)
    116133      : base(deserializing) {
     134      this.resultPollingThreads = new Dictionary<Guid, Thread>();
     135      jobItems = new JobItemList();
    117136    }
    118137
     
    124143      pausePending = stopPending = false;
    125144      jobItems = new JobItemList();
     145      isPollingResults = false;
     146      resultPollingThreads = new Dictionary<Guid, Thread>();
    126147      InitTimer();
    127148    }
     
    142163      clone.pausePending = this.pausePending;
    143164      clone.jobItems = (JobItemList)cloner.Clone(jobItems);
     165      clone.lastUpdateTime = this.lastUpdateTime;
     166      clone.isPollingResults = this.isPollingResults;
    144167      return clone;
    145168    }
     
    148171    private void AfterDeserialization() {
    149172      InitTimer();
     173      this.IsPollingResults = false;
     174      this.stopResultsPollingPending = false;
    150175      LogMessage("I was deserialized.");
    151176    }
     
    215240      this.ExecutionState = Core.ExecutionState.Started;
    216241      Thread t = new Thread(() => {
    217         IExecutionEngineFacade executionEngineFacade = ServiceLocator.CreateExecutionEngineFacade(ServerUrl);
     242        IExecutionEngineFacade executionEngineFacade = GetExecutionEngineFacade();
    218243
    219244        pendingOptimizers = new Dictionary<Guid, IOptimizer>();
     
    234259          };
    235260          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       
    240266        // 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();
    244268      });
    245269      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);
    246297    }
    247298
     
    267318
    268319    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    }
    272331    #endregion
     332
     333    private IExecutionEngineFacade GetExecutionEngineFacade() {
     334      return ServiceLocator.CreateExecutionEngineFacade(ServerUrl);
     335    }
    273336
    274337    private SerializedJob CreateSerializedJob(IOptimizer optimizer) {
     
    307370    }
    308371
    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            }
    318384
    319385            ResponseObject<JobDto> response = executionEngineFacade.GetJobById(job.Id);
    320386            LogMessage("Response: " + response.StatusMessage + " (jobId: " + job.Id + ")");
     387            GetJobItemById(job.Id).LogMessage("Response: " + response.StatusMessage);
    321388
    322389            if (response.Obj != null) {
    323390              UpdateJobItem(response.Obj);
    324391            }
    325            
     392
    326393            // loop while
    327394            // 1. the user doesn't request an abort
     
    334401              UpdateSnapshot(jobResponse);
    335402            }
    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          }
    351427        }
    352428      });
    353       t.Start();
    354429    }
    355430
     
    370445      }
    371446    }
    372    
     447
    373448    #region Required Plugin Search
    374449    /// <summary>
     
    523598    }
    524599
     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    }
    525612    #endregion
    526613  }
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItem.cs

    r4121 r4133  
    88using HeuristicLab.Hive.Contracts;
    99using System.Drawing;
     10using HeuristicLab.Common;
     11using System.Diagnostics;
    1012
    1113namespace HeuristicLab.Hive.Experiment {
     14  [StorableClass]
    1215  public class JobItem : Item {
     16    private static object locker = new object();
     17
    1318    public override Image ItemImage {
    1419      get {
     
    5964      get { return log; }
    6065    }
    61 
     66   
    6267    public JobItem() {
    6368      log = new Log();
     
    7378
    7479    public event EventHandler LatestSnapshotChanged;
    75     public void OnLatestSnapshotChanged() {
     80    private void OnLatestSnapshotChanged() {
     81      LogMessage("LatestSnapshotChanged");
    7682      EventHandler handler = LatestSnapshotChanged;
    7783      if (handler != null) handler(this, EventArgs.Empty);
     
    8086    public event EventHandler JobDtoChanged;
    8187    private void OnJobDtoChanged() {
     88      LogMessage("JobDtoChanged");
    8289      EventHandler handler = JobDtoChanged;
    8390      if (handler != null) handler(this, EventArgs.Empty);
    8491    }
     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    }
    85108  }
    86109}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/JobItemList.cs

    r4120 r4133  
    1414    public JobItemList(int capacity) : base(capacity) { }
    1515    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    }
    1621  }
    1722}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Experiment/3.3/Properties/AssemblyInfo.cs

    r4121 r4133  
    5555// You can specify all the values or you can default the Revision and Build Numbers
    5656// by using the '*' as shown below:
    57 [assembly: AssemblyVersion("3.3.0.4120")]
    58 [assembly: AssemblyFileVersion("3.3.0.4120")]
    59 [assembly: AssemblyBuildDate("2010/07/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  
    9191  </PropertyGroup>
    9292  <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" />
    9595    <Reference Include="HeuristicLab.Core-3.3">
    9696      <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  
    7878  </PropertyGroup>
    7979  <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>
    8083    <Reference Include="HeuristicLab.Core-3.3">
    8184      <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  
    584584      response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED;
    585585      response.JobId = jobId;
    586       response.finished = finished;
     586      response.Finished = finished;
    587587
    588588      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  
    168168    }
    169169
    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>();
    172172
    173173      ClientDto client = DaoLocator.ClientDao.FindById(resourceId);
    174174      if (client != null) {
    175         List<ClientGroup> groupsOfClient = new List<ClientGroup>(DaoLocator.ClientGroupDao.MemberOf(client));
     175        ClientGroupDtoList groupsOfClient = new ClientGroupDtoList(DaoLocator.ClientGroupDao.MemberOf(client));
    176176        response.Obj = groupsOfClient;
    177177        response.Success = true;
     
    179179      }
    180180      else {
    181         response.Obj = new List<ClientGroup>();
     181        response.Obj = new ClientGroupDtoList();
    182182        response.Success = false;
    183183        response.StatusMessage = ApplicationConstants.RESPONSE_CLIENT_RESOURCE_NOT_FOUND;
     
    217217    }
    218218    #endregion
    219   }
     219 }
    220220}
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Facades/ServerConsoleFacade.cs

    r4092 r4133  
    184184    }
    185185
    186     public ResponseObject<List<ClientGroupDto>> GetAllGroupsOfResource(Guid resourceId) {
     186    public ResponseObject<ClientGroupDtoList> GetAllGroupsOfResource(Guid resourceId) {
    187187      using (contextFactory.GetContext()) {
    188188        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  
    7676  </PropertyGroup>
    7777  <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>
    7884    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    7985      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
     
    136142    </Compile>
    137143    <Compile Include="Settings.cs" />
    138     <Compile Include="SpringTransaction.cs" />
    139144  </ItemGroup>
    140145  <ItemGroup>
  • branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/Properties/AssemblyInfo.cs

    r4121 r4133  
    5555// by using the '*' as shown below:
    5656// [assembly: AssemblyVersion("1.0.*")]
    57 [assembly: AssemblyVersion("3.3.0.4120")]
    58 [assembly: AssemblyFileVersion("3.3.0.4120")]
    59 [assembly: AssemblyBuildDate("2010/07/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  
    129129  </ItemGroup>
    130130  <ItemGroup>
     131    <Reference Include="HeuristicLab.Common-3.3">
     132      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     133    </Reference>
    131134    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    132135      <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  
    7777  </PropertyGroup>
    7878  <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>
    7982    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    8083      <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  
    5151//      Revision
    5252//
    53 [assembly: AssemblyVersion("3.3.0.4120")]
    54 [assembly: AssemblyFileVersion("3.3.0.4120")]
     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  
    159159  </ItemGroup>
    160160  <ItemGroup>
     161    <Reference Include="HeuristicLab.Common-3.3">
     162      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.Common-3.3.dll</HintPath>
     163    </Reference>
    161164    <Reference Include="HeuristicLab.PluginInfrastructure-3.3">
    162165      <HintPath>..\..\..\..\..\..\..\..\..\Programme\HeuristicLab 3.3\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath>
Note: See TracChangeset for help on using the changeset viewer.