[3011] | 1 | #region License Information
|
---|
| 2 | /* HeuristicLab
|
---|
| 3 | * Copyright (C) 2002-2008 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
|
---|
| 4 | *
|
---|
| 5 | * This file is part of HeuristicLab.
|
---|
| 6 | *
|
---|
| 7 | * HeuristicLab is free software: you can redistribute it and/or modify
|
---|
| 8 | * it under the terms of the GNU General Public License as published by
|
---|
| 9 | * the Free Software Foundation, either version 3 of the License, or
|
---|
| 10 | * (at your option) any later version.
|
---|
| 11 | *
|
---|
| 12 | * HeuristicLab is distributed in the hope that it will be useful,
|
---|
| 13 | * but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
| 14 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
| 15 | * GNU General Public License for more details.
|
---|
| 16 | *
|
---|
| 17 | * You should have received a copy of the GNU General Public License
|
---|
| 18 | * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
|
---|
| 19 | */
|
---|
| 20 | #endregion
|
---|
| 21 |
|
---|
| 22 | using System;
|
---|
| 23 | using System.Collections.Generic;
|
---|
| 24 | using System.Linq;
|
---|
| 25 | using System.Text;
|
---|
| 26 | using System.Runtime.Serialization;
|
---|
[4133] | 27 | using HeuristicLab.Common;
|
---|
| 28 | using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
|
---|
[4141] | 29 |
|
---|
[3011] | 30 | namespace HeuristicLab.Hive.Contracts.BusinessObjects {
|
---|
| 31 |
|
---|
[4141] | 32 | public enum State { NullState, Idle, Calculating, Offline, Finished, Abort, RequestSnapshot, RequestSnapshotSent, Pending, Failed };
|
---|
[3203] | 33 | public enum CalendarState { Fetch, ForceFetch, Fetching, Fetched, NotAllowedToFetch };
|
---|
[3011] | 34 |
|
---|
[4133] | 35 | [StorableClass]
|
---|
[3011] | 36 | [DataContract]
|
---|
| 37 | [Serializable]
|
---|
| 38 | public class ClientDto : ResourceDto {
|
---|
[4133] | 39 | [Storable]
|
---|
[3011] | 40 | [DataMember]
|
---|
| 41 | public int NrOfCores { get; set; }
|
---|
[4133] | 42 | [Storable]
|
---|
[3011] | 43 | [DataMember]
|
---|
| 44 | public int NrOfFreeCores { get; set; }
|
---|
[4133] | 45 | [Storable]
|
---|
[3011] | 46 | [DataMember]
|
---|
[3931] | 47 | public int? CpuSpeedPerCore { get; set; }
|
---|
[4133] | 48 | [Storable]
|
---|
[3011] | 49 | [DataMember]
|
---|
| 50 | public int Memory { get; set; }
|
---|
[4133] | 51 | [Storable]
|
---|
[3011] | 52 | [DataMember]
|
---|
| 53 | public int FreeMemory { get; set; }
|
---|
[4133] | 54 | [Storable]
|
---|
[3011] | 55 | [DataMember]
|
---|
[3931] | 56 | public DateTime? Login { get; set; }
|
---|
[4133] | 57 | [Storable]
|
---|
[3011] | 58 | [DataMember]
|
---|
| 59 | public State State { get; set; }
|
---|
[4133] | 60 | [Storable]
|
---|
[3011] | 61 | [DataMember]
|
---|
[3203] | 62 | public CalendarState CalendarSyncStatus { get; set; }
|
---|
[4133] | 63 | [Storable]
|
---|
[3203] | 64 | [DataMember]
|
---|
[3011] | 65 | public ClientConfigDto Config { get; set; }
|
---|
| 66 |
|
---|
| 67 | public override string ToString() {
|
---|
| 68 | return base.ToString() + ", NrOfCores: " + NrOfCores + ", NrOfFreeCores " + NrOfFreeCores + ", Login: " + Login + ", State: " + State;
|
---|
| 69 | }
|
---|
[4133] | 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 | }
|
---|
[3011] | 84 | }
|
---|
| 85 | }
|
---|