Changeset 5614 for branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer
- Timestamp:
- 03/07/11 12:56:21 (14 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.Common/3.4/DataTransfer
- Files:
-
- 1 deleted
- 14 edited
Legend:
- Unmodified
- Added
- Removed
-
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 }
Note: See TracChangeset
for help on using the changeset viewer.