Changeset 5614
- Timestamp:
- 03/07/11 12:56:21 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources
- Files:
-
- 7 added
- 1 deleted
- 25 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive.Views/3.4/Administration/HiveAppointment.cs
r5538 r5614 23 23 using System.Drawing; 24 24 using System.Xml.Serialization; 25 using Calendar;26 25 27 26 namespace HeuristicLab.Clients.Hive.Views.Administration { 28 27 29 public class HiveAppointment : Appointment {28 public class HiveAppointment : Calendar.Appointment { 30 29 private Guid recurringId = Guid.Empty; 31 30 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/HeuristicLab.Clients.Hive-3.4.csproj
r5602 r5614 142 142 <None Include="Properties\AssemblyInfo.cs.frame" /> 143 143 <Compile Include="Exceptions\ServiceClientFactoryException.cs" /> 144 <Compile Include="ServiceClients\Appointment.cs" /> 145 <Compile Include="ServiceClients\Heartbeat.cs" /> 146 <Compile Include="ServiceClients\HiveExperimentPermission.cs" /> 147 <Compile Include="ServiceClients\JobData.cs" /> 148 <Compile Include="ServiceClients\Plugin.cs" /> 149 <Compile Include="ServiceClients\PluginData.cs" /> 150 <Compile Include="ServiceClients\Resource.cs" /> 144 151 <Compile Include="ServiceClients\StateLog.cs" /> 145 152 <Compile Include="ServiceClients\HiveExperiment.cs" /> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveExperiment.cs
r5602 r5614 20 20 #endregion 21 21 22 using HeuristicLab.Co re;22 using HeuristicLab.Common; 23 23 24 24 namespace HeuristicLab.Clients.Hive { 25 25 26 [Item("HiveExperiment", "A Hive Experiment.")] 27 public partial class HiveExperiment { 26 public partial class HiveExperiment : IDeepCloneable, IContent { 28 27 29 28 public HiveExperiment() { } 30 29 30 protected HiveExperiment(HiveExperiment original, Cloner cloner) { 31 this.RootJobId = original.RootJobId; 32 this.OwnerUserId = original.OwnerUserId; 33 this.DateCreated = original.DateCreated; 34 this.ResourceNames = original.ResourceNames; 35 this.LastAccessed = original.LastAccessed; 36 this.Name = original.Name; 37 this.Description = original.Description; 38 this.Id = original.Id; 39 } 40 public IDeepCloneable Clone(Cloner cloner) { 41 return new HiveExperiment(this, cloner); 42 } 43 44 public override string ToString() { 45 return base.ToString() + "Name: " + Name + ", Description: " + Description; 46 } 47 48 public object Clone() { 49 return Clone(new Cloner()); 50 } 31 51 } 32 52 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/HiveServiceClient.cs
r5602 r5614 14 14 using System; 15 15 16 17 [System.Diagnostics.DebuggerStepThroughAttribute()]18 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]19 [System.Runtime.Serialization.DataContractAttribute(Name="HiveItemBase", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +20 "nsfer")]21 [System.SerializableAttribute()]22 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.JobData))]23 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveItem))]24 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.LightweightJob))]25 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.StateLog))]26 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Job))]27 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.PluginData))]28 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.NamedHiveItem))]29 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.HiveExperiment))]30 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Plugin))]31 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Resource))]32 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))]33 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))]34 public partial class HiveItemBase : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged35 {36 37 [System.NonSerializedAttribute()]38 private System.Runtime.Serialization.ExtensionDataObject extensionDataField;39 40 public System.Runtime.Serialization.ExtensionDataObject ExtensionData41 {42 get43 {44 return this.extensionDataField;45 }46 set47 {48 this.extensionDataField = value;49 }50 }51 52 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;53 54 protected void RaisePropertyChanged(string propertyName)55 {56 System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;57 if ((propertyChanged != null))58 {59 propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));60 }61 }62 }63 64 [System.Diagnostics.DebuggerStepThroughAttribute()]65 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")]66 [System.Runtime.Serialization.DataContractAttribute(Name="JobData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" +67 "nsfer")]68 [System.SerializableAttribute()]69 public partial class JobData : HeuristicLab.Clients.Hive.HiveItemBase70 {71 72 [System.Runtime.Serialization.OptionalFieldAttribute()]73 private byte[] DataField;74 75 [System.Runtime.Serialization.OptionalFieldAttribute()]76 private System.Guid JobIdField;77 78 [System.Runtime.Serialization.OptionalFieldAttribute()]79 private System.DateTime LastUpdateField;80 81 [System.Runtime.Serialization.DataMemberAttribute()]82 public byte[] Data83 {84 get85 {86 return this.DataField;87 }88 set89 {90 if ((object.ReferenceEquals(this.DataField, value) != true))91 {92 this.DataField = value;93 this.RaisePropertyChanged("Data");94 }95 }96 }97 98 [System.Runtime.Serialization.DataMemberAttribute()]99 public System.Guid JobId100 {101 get102 {103 return this.JobIdField;104 }105 set106 {107 if ((this.JobIdField.Equals(value) != true))108 {109 this.JobIdField = value;110 this.RaisePropertyChanged("JobId");111 }112 }113 }114 115 [System.Runtime.Serialization.DataMemberAttribute()]116 public System.DateTime LastUpdate117 {118 get119 {120 return this.LastUpdateField;121 }122 set123 {124 if ((this.LastUpdateField.Equals(value) != true))125 {126 this.LastUpdateField = value;127 this.RaisePropertyChanged("LastUpdate");128 }129 }130 }131 }132 16 133 17 [System.Diagnostics.DebuggerStepThroughAttribute()] … … 146 30 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.Slave))] 147 31 [System.Runtime.Serialization.KnownTypeAttribute(typeof(HeuristicLab.Clients.Hive.SlaveGroup))] 148 public partial class HiveItem : HeuristicLab.Clients.Hive.HiveItemBase 149 { 32 public partial class HiveItem : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged 33 { 34 35 [System.NonSerializedAttribute()] 36 private System.Runtime.Serialization.ExtensionDataObject extensionDataField; 150 37 151 38 [System.Runtime.Serialization.OptionalFieldAttribute()] 152 39 private System.Guid IdField; 40 41 public System.Runtime.Serialization.ExtensionDataObject ExtensionData 42 { 43 get 44 { 45 return this.extensionDataField; 46 } 47 set 48 { 49 this.extensionDataField = value; 50 } 51 } 153 52 154 53 [System.Runtime.Serialization.DataMemberAttribute()] … … 166 65 this.RaisePropertyChanged("Id"); 167 66 } 67 } 68 } 69 70 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; 71 72 protected void RaisePropertyChanged(string propertyName) 73 { 74 System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; 75 if ((propertyChanged != null)) 76 { 77 propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); 168 78 } 169 79 } … … 1163 1073 [System.Runtime.Serialization.EnumMemberAttribute()] 1164 1074 Offline = 2, 1075 } 1076 1077 [System.Diagnostics.DebuggerStepThroughAttribute()] 1078 [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Runtime.Serialization", "4.0.0.0")] 1079 [System.Runtime.Serialization.DataContractAttribute(Name="JobData", Namespace="http://schemas.datacontract.org/2004/07/HeuristicLab.Services.Hive.Common.DataTra" + 1080 "nsfer")] 1081 [System.SerializableAttribute()] 1082 public partial class JobData : object, System.Runtime.Serialization.IExtensibleDataObject, System.ComponentModel.INotifyPropertyChanged 1083 { 1084 1085 [System.NonSerializedAttribute()] 1086 private System.Runtime.Serialization.ExtensionDataObject extensionDataField; 1087 1088 [System.Runtime.Serialization.OptionalFieldAttribute()] 1089 private byte[] DataField; 1090 1091 [System.Runtime.Serialization.OptionalFieldAttribute()] 1092 private System.Guid JobIdField; 1093 1094 [System.Runtime.Serialization.OptionalFieldAttribute()] 1095 private System.DateTime LastUpdateField; 1096 1097 public System.Runtime.Serialization.ExtensionDataObject ExtensionData 1098 { 1099 get 1100 { 1101 return this.extensionDataField; 1102 } 1103 set 1104 { 1105 this.extensionDataField = value; 1106 } 1107 } 1108 1109 [System.Runtime.Serialization.DataMemberAttribute()] 1110 public byte[] Data 1111 { 1112 get 1113 { 1114 return this.DataField; 1115 } 1116 set 1117 { 1118 if ((object.ReferenceEquals(this.DataField, value) != true)) 1119 { 1120 this.DataField = value; 1121 this.RaisePropertyChanged("Data"); 1122 } 1123 } 1124 } 1125 1126 [System.Runtime.Serialization.DataMemberAttribute()] 1127 public System.Guid JobId 1128 { 1129 get 1130 { 1131 return this.JobIdField; 1132 } 1133 set 1134 { 1135 if ((this.JobIdField.Equals(value) != true)) 1136 { 1137 this.JobIdField = value; 1138 this.RaisePropertyChanged("JobId"); 1139 } 1140 } 1141 } 1142 1143 [System.Runtime.Serialization.DataMemberAttribute()] 1144 public System.DateTime LastUpdate 1145 { 1146 get 1147 { 1148 return this.LastUpdateField; 1149 } 1150 set 1151 { 1152 if ((this.LastUpdateField.Equals(value) != true)) 1153 { 1154 this.LastUpdateField = value; 1155 this.RaisePropertyChanged("LastUpdate"); 1156 } 1157 } 1158 } 1159 1160 public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged; 1161 1162 protected void RaisePropertyChanged(string propertyName) 1163 { 1164 System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged; 1165 if ((propertyChanged != null)) 1166 { 1167 propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName)); 1168 } 1169 } 1165 1170 } 1166 1171 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Job.cs
r5602 r5614 23 23 using System.Collections.Generic; 24 24 using HeuristicLab.Common; 25 using HeuristicLab.Core;26 25 27 26 namespace HeuristicLab.Clients.Hive { 28 27 29 [Item("Job", "A Hive job.")] 30 public partial class Job : IDeepCloneable { 28 public partial class Job : LightweightJob { 31 29 32 30 public Job() { } … … 70 68 } 71 69 72 70 public override string ToString() { 71 return string.Format("State: {0}, SlaveId: {1}, DateCreated: {2}, DateCalculated: {3}, CoresNeeded: {4}, MemoryNeeded: {5}", State, CurrentStateLog.SlaveId, DateCreated, CoresNeeded, MemoryNeeded); 72 } 73 73 } 74 74 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/LightweightJob.cs
r5602 r5614 23 23 using System.Collections.Generic; 24 24 using System.Linq; 25 using HeuristicLab.Co re;25 using HeuristicLab.Common; 26 26 27 27 namespace HeuristicLab.Clients.Hive { 28 28 29 [Item("LightweightJob", "A lightweight Hive job.")] 30 public partial class LightweightJob { 29 public partial class LightweightJob : IDeepCloneable, IContent { 31 30 32 31 public LightweightJob() { … … 40 39 this.StateLog = new List<StateLog>(job.StateLog); 41 40 this.State = job.State; 41 } 42 43 protected LightweightJob(LightweightJob original, Cloner cloner) { 44 this.ExecutionTime = original.ExecutionTime; 45 this.ParentJobId = original.ParentJobId; 46 this.StateLog = new List<StateLog>(original.StateLog); 47 this.State = original.State; 48 this.Id = original.Id; 49 } 50 public IDeepCloneable Clone(Cloner cloner) { 51 return new LightweightJob(this, cloner); 52 } 53 54 public object Clone() { 55 return Clone(new Cloner()); 42 56 } 43 57 -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/MessageContainer.cs
r5599 r5614 26 26 namespace HeuristicLab.Clients.Hive { 27 27 [StorableClass] 28 public partial class MessageContainer : IDeepCloneable {28 public partial class MessageContainer : IDeepCloneable, IContent { 29 29 30 30 protected MessageContainer() { } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/Slave.cs
r5602 r5614 20 20 #endregion 21 21 22 using HeuristicLab.Core;23 22 23 using HeuristicLab.Common; 24 24 namespace HeuristicLab.Clients.Hive { 25 25 26 [Item("Slave", "A Slave used for calculating jobs.")] 27 public partial class Slave { 26 public partial class Slave : IContent, IDeepCloneable { 28 27 29 public Slave() { } 28 public Slave() { 29 SlaveState = SlaveState.Idle; 30 } 30 31 32 protected Slave(Slave original, Cloner cloner) 33 : base(original, cloner) { 34 this.Cores = original.Cores; 35 this.FreeCores = original.FreeCores; 36 this.CpuSpeed = original.CpuSpeed; 37 this.Memory = original.Memory; 38 this.FreeMemory = original.FreeMemory; 39 this.SlaveState = original.SlaveState; 40 this.IsAllowedToCalculate = original.IsAllowedToCalculate; 41 this.OperatingSystem = original.OperatingSystem; 42 this.CpuArchitecture = original.CpuArchitecture; 43 this.LastHeartbeat = original.LastHeartbeat; 44 } 45 46 public IDeepCloneable Clone(Cloner cloner) { 47 return new Slave(this, cloner); 48 } 49 50 public override string ToString() { 51 return string.Format("Cores: {0}, FreeCores: {1}", Cores, FreeCores); 52 } 53 54 public object Clone() { 55 return Clone(new Cloner()); 56 } 31 57 } 32 58 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/SlaveGroup.cs
r5602 r5614 20 20 #endregion 21 21 22 using HeuristicLab.Co re;22 using HeuristicLab.Common; 23 23 24 24 namespace HeuristicLab.Clients.Hive { 25 25 26 [Item("SlaveGroup", "A group of Hive slaves.")] 27 public partial class SlaveGroup { 26 public partial class SlaveGroup : IContent, IDeepCloneable { 28 27 29 28 public SlaveGroup() { } 30 29 30 protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { } 31 32 public IDeepCloneable Clone(Cloner cloner) { 33 return new SlaveGroup(this, cloner); 34 } 35 36 public object Clone() { 37 return Clone(new Cloner()); 38 } 31 39 } 32 40 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Clients.Hive/3.4/ServiceClients/StateLog.cs
r5602 r5614 20 20 #endregion 21 21 22 using HeuristicLab.Co re;22 using HeuristicLab.Common; 23 23 24 24 namespace HeuristicLab.Clients.Hive { 25 25 26 [Item("StateLog", "An entry in a log containing information for a job.")] 27 public partial class StateLog { 26 public partial class StateLog : IContent, IDeepCloneable { 28 27 29 28 public StateLog() { } 30 29 30 protected StateLog(StateLog original, Cloner cloner) { 31 this.DateTime = original.DateTime; 32 this.UserId = original.UserId; 33 this.SlaveId = original.SlaveId; 34 this.Exception = original.Exception; 35 this.State = original.State; 36 this.JobId = original.JobId; 37 this.Id = original.Id; 38 } 39 40 public IDeepCloneable Clone(Cloner cloner) { 41 return new StateLog(this, cloner); 42 } 43 44 public object Clone() { 45 return Clone(new Cloner()); 46 } 31 47 } 32 48 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Appointment.cs
r5599 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 40 39 public Guid ResourceId { get; set; } 41 40 42 protected Appointment(Appointment original, Cloner cloner) 43 : base(original, cloner) { 44 this.AllDayEvent = original.AllDayEvent; 45 this.EndDate = original.EndDate; 46 this.Recurring = original.Recurring; 47 this.RecurringId = original.RecurringId; 48 this.ResourceId = original.ResourceId; 49 this.StartDate = original.StartDate; 50 } 51 public override IDeepCloneable Clone(Cloner cloner) { 52 return new Appointment(this, cloner); 53 } 41 54 42 } 55 43 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperiment.cs
r5511 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 40 39 41 40 public HiveExperiment() { } 42 protected HiveExperiment(HiveExperiment original, Cloner cloner) : base(original, cloner) { 43 this.RootJobId = original.RootJobId; 44 this.OwnerUserId = original.OwnerUserId; 45 this.DateCreated = original.DateCreated; 46 this.ResourceNames = original.ResourceNames; 47 this.LastAccessed = original.LastAccessed; 48 } 49 public override IDeepCloneable Clone(Cloner cloner) { 50 return new HiveExperiment(this, cloner); 51 } 41 52 42 53 43 public override string ToString() { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveExperimentPermission.cs
r5511 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 27 26 [DataContract] 28 27 [Serializable] 29 public class HiveExperimentPermission : HiveItemBase{28 public class HiveExperimentPermission { 30 29 [DataMember] 31 30 public Guid HiveExperimentId { get; set; } … … 39 38 public HiveExperimentPermission() { } 40 39 41 protected HiveExperimentPermission(HiveExperimentPermission original, Cloner cloner) : base(original, cloner) { 42 this.HiveExperimentId = original.HiveExperimentId; 43 this.GrantedUserId = original.GrantedUserId; 44 this.GrantedByUserId = original.GrantedByUserId; 45 this.Permission = original.Permission; 46 } 47 public override IDeepCloneable Clone(Cloner cloner) { 48 return new HiveExperimentPermission(this, cloner); 49 } 40 50 41 } 51 42 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/HiveItem.cs
r4796 r5614 1 1 using System; 2 using System.Collections.Generic;3 using System.Linq;4 using System.Text;5 2 using System.Runtime.Serialization; 6 using HeuristicLab.Common;7 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;8 3 9 4 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 10 5 [DataContract] 11 6 [Serializable] 12 public abstract class HiveItem : HiveItemBase{7 public abstract class HiveItem { 13 8 [DataMember] 14 9 public Guid Id { get; set; } 15 10 16 11 public HiveItem() { } 17 protected HiveItem(HiveItem original, Cloner cloner) : base(original, cloner) { 18 this.Id = original.Id; 19 } 12 20 13 } 21 14 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Job.cs
r5526 r5614 23 23 using System.Collections.Generic; 24 24 using System.Runtime.Serialization; 25 using HeuristicLab.Common;26 25 27 26 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 43 42 [DataMember] 44 43 public bool FinishWhenChildJobsFinished { get; set; } 45 44 46 45 public Job() { 47 46 this.PluginsNeededIds = new List<Guid>(); 48 47 } 49 protected Job(Job original, Cloner cloner) : base(original, cloner) { 50 this.Priority = original.Priority; 51 this.CoresNeeded = original.CoresNeeded; 52 this.MemoryNeeded = original.MemoryNeeded; 53 this.PluginsNeededIds = new List<Guid>(original.PluginsNeededIds); 54 this.LastHeartbeat = original.LastHeartbeat; 55 this.IsParentJob = original.IsParentJob; 56 this.FinishWhenChildJobsFinished = original.FinishWhenChildJobsFinished; 57 } 58 public override IDeepCloneable Clone(Cloner cloner) { 59 return new Job(this, cloner); 60 } 48 61 49 62 50 public override string ToString() { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/JobData.cs
r5106 r5614 21 21 22 22 using System; 23 using System.IO;24 23 using System.Runtime.Serialization; 25 using HeuristicLab.Common;26 24 27 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 28 26 [DataContract] 29 27 [Serializable] 30 public class JobData : HiveItemBase{28 public class JobData { 31 29 [DataMember] 32 30 public Guid JobId { get; set; } … … 37 35 38 36 public JobData() { } 39 protected JobData(JobData original, Cloner cloner) : base(original, cloner) { 40 if (original.Data != null) this.Data = new byte[original.Data.Length]; Array.Copy(original.Data, this.Data, original.Data.Length); 41 this.LastUpdate = original.LastUpdate; 42 } 43 public override IDeepCloneable Clone(Cloner cloner) { 44 return new JobData(this, cloner); 45 } 37 46 38 } 47 39 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/LightweightJob.cs
r5526 r5614 24 24 using System.Linq; 25 25 using System.Runtime.Serialization; 26 using HeuristicLab.Common;27 26 28 27 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 54 53 this.State = job.State; 55 54 } 56 protected LightweightJob(LightweightJob original, Cloner cloner) 57 : base(original, cloner) { 58 this.ExecutionTime = original.ExecutionTime; 59 this.ParentJobId = original.ParentJobId; 60 this.StateLog = new List<StateLog>(original.StateLog); 61 this.State = original.State; 62 } 63 public override IDeepCloneable Clone(Cloner cloner) { 64 return new LightweightJob(this, cloner); 65 } 55 66 56 67 57 public void SetState(JobState state) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/NamedHiveItem.cs
r4796 r5614 1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Text; 5 using System.Runtime.Serialization; 6 using HeuristicLab.Common; 1 using System.Runtime.Serialization; 7 2 8 3 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 15 10 16 11 protected NamedHiveItem() { } 17 protected NamedHiveItem(NamedHiveItem original, Cloner cloner) : base(original, cloner) { 18 this.Name = original.Name; 19 this.Description = original.Description; 20 } 12 21 13 } 22 14 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Plugin.cs
r5402 r5614 21 21 22 22 using System; 23 using System.Collections.Generic;24 using System.Linq;25 23 using System.Runtime.Serialization; 26 using HeuristicLab.Common;27 24 28 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 43 40 44 41 public Plugin() { } 45 protected Plugin(Plugin original, Cloner cloner) : base(original, cloner) { 46 this.Version = original.Version; 47 this.UserId = original.UserId; 48 this.DateCreated = original.DateCreated; 49 this.IsLocal = original.IsLocal; 50 } 51 public override IDeepCloneable Clone(Cloner cloner) { 52 return new Plugin(this, cloner); 53 } 42 43 54 44 } 55 45 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/PluginData.cs
r5402 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 36 35 37 36 public PluginData() { } 38 protected PluginData(PluginData original, Cloner cloner) 39 : base(original, cloner) { 40 if (original.Data != null) 41 this.Data = new byte[original.Data.Length]; 42 Array.Copy(original.Data, this.Data, original.Data.Length); 43 this.FileName = original.FileName; 44 this.PluginId = original.PluginId; 45 } 46 public override IDeepCloneable Clone(Cloner cloner) { 47 return new PluginData(this, cloner); 48 } 37 38 49 39 } 50 40 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Resource.cs
r5106 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 32 31 33 32 public Resource() { } 34 protected Resource(Resource original, Cloner cloner) : base(original, cloner) { 35 this.ParentResourceId = original.ParentResourceId; 36 } 37 public override IDeepCloneable Clone(Cloner cloner) { 38 return new Resource(this, cloner); 39 } 33 40 34 } 41 35 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/Slave.cs
r5405 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 56 55 SlaveState = DataTransfer.SlaveState.Idle; 57 56 } 58 protected Slave(Slave original, Cloner cloner) : base(original, cloner) {59 this.Cores = original.Cores;60 this.FreeCores = original.FreeCores;61 this.CpuSpeed = original.CpuSpeed;62 this.Memory = original.Memory;63 this.FreeMemory = original.FreeMemory;64 this.SlaveState = original.SlaveState;65 this.IsAllowedToCalculate = original.IsAllowedToCalculate;66 this.OperatingSystem = original.OperatingSystem;67 this.CpuArchitecture = original.CpuArchitecture;68 this.LastHeartbeat = original.LastHeartbeat;69 }70 public override IDeepCloneable Clone(Cloner cloner) {71 return new Slave(this, cloner);72 }73 57 74 58 public override string ToString() { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/SlaveGroup.cs
r5106 r5614 20 20 #endregion 21 21 22 using System.Collections.Generic;23 using System.Linq;24 22 using System.Runtime.Serialization; 25 using System;26 using HeuristicLab.Common;27 23 28 24 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 30 26 public class SlaveGroup : Resource { 31 27 public SlaveGroup() { } 32 protected SlaveGroup(SlaveGroup original, Cloner cloner) : base(original, cloner) { }33 public override IDeepCloneable Clone(Cloner cloner) {34 return new SlaveGroup(this, cloner);35 }36 28 } 37 29 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer/StateLog.cs
r5511 r5614 22 22 using System; 23 23 using System.Runtime.Serialization; 24 using HeuristicLab.Common;25 24 26 25 namespace HeuristicLab.Services.Hive.Common.DataTransfer { … … 43 42 public StateLog() { } 44 43 45 protected StateLog(StateLog original, Cloner cloner) : base(original, cloner) {46 this.DateTime = original.DateTime;47 this.UserId = original.UserId;48 this.SlaveId = original.SlaveId;49 this.Exception = original.Exception;50 this.State = original.State;51 this.JobId = original.JobId;52 }53 public override IDeepCloneable Clone(Cloner cloner) {54 return new StateLog(this, cloner);55 }56 44 } 57 45 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/HeuristicLab.Services.Hive.Common-3.4.csproj
r5511 r5614 102 102 <Compile Include="DataTransfer\HiveExperiment.cs" /> 103 103 <Compile Include="DataTransfer\HiveItem.cs" /> 104 <Compile Include="DataTransfer\HiveItemBase.cs" />105 104 <Compile Include="DataTransfer\Permission.cs" /> 106 105 <Compile Include="DataTransfer\PluginData.cs" />
Note: See TracChangeset
for help on using the changeset viewer.