Free cookie consent management tool by TermsFeed Policy Generator

Changeset 820


Ignore:
Timestamp:
11/26/08 14:59:57 (15 years ago)
Author:
msteinbi
Message:

First dummy implementation of the external interfaces for the Console Manager (#395)

Location:
trunk/sources/HeuristicLab.Hive.Server.Core
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs

    r800 r820  
    88namespace HeuristicLab.Hive.Server.Core {
    99  class ClientManager: IClientManager {
     10
     11    List<ClientInfo> clients;
     12    List<ClientGroup> clientGroups;
     13
     14    public ClientManager() {
     15      clients = new List<ClientInfo>();
     16      clientGroups = new List<ClientGroup>();
     17
     18      clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2500, Memory=4096, ResourceId=1, State=State.idle });
     19      clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=2100, Memory=2048, ResourceId=2, State=State.idle });
     20      clients.Add(new ClientInfo { ClientId=Guid.NewGuid(), CpuSpeedPerCore=3400, Memory=4096, ResourceId=3, State=State.calculating });
     21
     22      clientGroups.Add(new ClientGroup { ResourceId = 4, Name = "SuperGroup", ClientGroupId = 1 });
     23    }
     24
    1025    #region IClientManager Members
    1126
    1227    public List<ClientInfo> GetAllClients() {
    13       return new List<ClientInfo>();
     28      return clients;
    1429    }
    1530
    1631    public List<ClientGroup> GetAllClientGroups() {
    17       return new List<ClientGroup>();
     32      return clientGroups;
    1833    }
    1934
  • trunk/sources/HeuristicLab.Hive.Server.Core/JobManager.cs

    r800 r820  
    88namespace HeuristicLab.Hive.Server.Core {
    99  class JobManager: IJobManager {
     10
     11    List<Job> jobs;
     12
    1013    #region IJobManager Members
    1114
     15    public JobManager() {
     16      jobs = new List<Job>();
     17
     18      jobs.Add(new Job { JobId = 1, State = State.idle });
     19      jobs.Add(new Job { JobId = 2, State = State.idle });
     20      jobs.Add(new Job { JobId = 3, State = State.idle });
     21    }
     22
    1223    public List<Job> GetAllJobs() {
    13       throw new NotImplementedException();
     24      return jobs;
    1425    }
    1526
  • trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs

    r800 r820  
    88namespace HeuristicLab.Hive.Server.Core {
    99  class UserRoleManager: IUserRoleManager {
     10
     11    List<User> users;
     12    List<UserGroup> userGroups;
     13
     14    public UserRoleManager() {
     15      users = new List<User>();
     16      userGroups = new List<UserGroup>();
     17
     18      users.Add(new User { UserId = 1, Name = "Hugo", Password = "hUg0" });
     19      users.Add(new User { UserId = 2, Name = "Seppl", Password = "seppl" });
     20      users.Add(new User { UserId = 3, Name = "Greg", Password = "greg" });
     21
     22      userGroups.Add(new UserGroup { UserGroupId = 1 });
     23      userGroups.Add(new UserGroup { UserGroupId = 2 });
     24    }
     25
    1026    #region IUserRoleManager Members
    1127
    1228    public List<User> GetAllUsers() {
    13       throw new NotImplementedException();
     29      return users;     
    1430    }
    1531
    1632    public List<UserGroup> GetAllUserGroups() {
    17       throw new NotImplementedException();
     33      return userGroups;
    1834    }
    1935
Note: See TracChangeset for help on using the changeset viewer.