Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1121 for trunk/sources


Ignore:
Timestamp:
01/14/09 16:16:21 (15 years ago)
Author:
msteinbi
Message:

Add licencse information where missing, added method description comments (#466)

Location:
trunk/sources
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Contracts/ApplicationConstants.cs

    r1118 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Contracts/BusinessObjects/HeartBeatData.cs

    r1119 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IClientManager.cs

    r999 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/ITransactionManager.cs

    r948 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IUserRoleManager.cs

    r1011 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Contracts/ResponseHB.cs

    r783 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs

    r1120 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    1839  /// </summary>
    1940  public class ClientCommunicator: IClientCommunicator {
    20     int nrOfJobs = 0;
    2141    Dictionary<Guid, DateTime> lastHeartbeats =
    2242      new Dictionary<Guid,DateTime>();
     
    2747    ILifecycleManager lifecycleManager;
    2848
     49    /// <summary>
     50    /// Initialization of the Adapters to the database
     51    /// Initialization of Eventhandler for the lifecycle management
     52    /// Initialization of lastHearbeats Dictionary
     53    /// </summary>
    2954    public ClientCommunicator() {
    3055      clientAdapter = ServiceLocator.GetClientAdapter();
     
    3661        new EventHandler(lifecycleManager_OnServerHeartbeat);
    3762
    38       for (int i = 0; i < nrOfJobs; i++) {
    39         Job job = new Job();
    40         job.Id = i;
    41         job.State = State.offline;
    42         jobAdapter.Update(job);
    43       }
    4463      lastHeartbeats = new Dictionary<Guid, DateTime>();
    45 
    46     }
    47 
     64    }
     65
     66    /// <summary>
     67    /// Check if online clients send their hearbeats
     68    /// if not -> set them offline and check if they where calculating a job
     69    /// </summary>
     70    /// <param name="sender"></param>
     71    /// <param name="e"></param>
    4872    [MethodImpl(MethodImplOptions.Synchronized)]
    4973    void lifecycleManager_OnServerHeartbeat(object sender, EventArgs e) {
     
    89113    #region IClientCommunicator Members
    90114
     115    /// <summary>
     116    /// Login process for the client
     117    /// A hearbeat entry is created as well (login is the first hearbeat)
     118    /// </summary>
     119    /// <param name="clientInfo"></param>
     120    /// <returns></returns>
    91121    [MethodImpl(MethodImplOptions.Synchronized)]
    92122    public Response Login(ClientInfo clientInfo) {
     
    114144    }
    115145
     146    /// <summary>
     147    /// The client has to send regulary heartbeats
     148    /// this hearbeats will be stored in the heartbeats dictionary
     149    /// check if there is work for the client and send the client a response if he should pull a job
     150    /// </summary>
     151    /// <param name="hbData"></param>
     152    /// <returns></returns>
    116153    [MethodImpl(MethodImplOptions.Synchronized)]
    117154    public ResponseHB SendHeartBeat(HeartBeatData hbData) {
     
    143180      return response;
    144181    }
    145 
     182   
     183    /// <summary>
     184    /// if the client asked to pull a job he calls this method
     185    /// the server selects a job and sends it to the client
     186    /// </summary>
     187    /// <param name="clientId"></param>
     188    /// <returns></returns>
    146189    [MethodImpl(MethodImplOptions.Synchronized)]
    147190    public ResponseJob PullJob(Guid clientId) {
     
    164207    }
    165208
     209    /// <summary>
     210    /// the client can send job results during calculating
     211    /// and will send a final job result when he finished calculating
     212    /// these job results will be stored in the database
     213    /// </summary>
     214    /// <param name="clientId"></param>
     215    /// <param name="jobId"></param>
     216    /// <param name="result"></param>
     217    /// <param name="exception"></param>
     218    /// <param name="finished"></param>
     219    /// <returns></returns>
    166220    [MethodImpl(MethodImplOptions.Synchronized)]
    167221    public ResponseResultReceived SendJobResult(Guid clientId,
     
    211265    }
    212266
     267    /// <summary>
     268    /// when a client logs out the state will be set
     269    /// and the entry in the last hearbeats dictionary will be removed
     270    /// </summary>
     271    /// <param name="clientId"></param>
     272    /// <returns></returns>
    213273    [MethodImpl(MethodImplOptions.Synchronized)]                       
    214274    public Response Logout(Guid clientId) {
  • trunk/sources/HeuristicLab.Hive.Server.Core/ClientManager.cs

    r995 r1121  
    5151    #region IClientManager Members
    5252
     53    /// <summary>
     54    /// Returns all clients stored in the database
     55    /// </summary>
     56    /// <returns></returns>
    5357    public ResponseList<ClientInfo> GetAllClients() {
    5458      ResponseList<ClientInfo> response = new ResponseList<ClientInfo>();
     
    6165    }
    6266
     67    /// <summary>
     68    /// returns all client groups stored in the database
     69    /// </summary>
     70    /// <returns></returns>
    6371    public ResponseList<ClientGroup> GetAllClientGroups() {
    6472      ResponseList<ClientGroup> response = new ResponseList<ClientGroup>();
     
    7785    }
    7886
     87    /// <summary>
     88    /// Add a client group into the database
     89    /// </summary>
     90    /// <param name="clientGroup"></param>
     91    /// <returns></returns>
    7992    public Response AddClientGroup(ClientGroup clientGroup) {
    8093      Response response = new Response();
     
    92105    }
    93106
     107    /// <summary>
     108    ///  Add a resource to a group
     109    /// </summary>
     110    /// <param name="clientGroupId"></param>
     111    /// <param name="resource"></param>
     112    /// <returns></returns>
    94113    public Response AddResourceToGroup(long clientGroupId, Resource resource) {
    95114      Response response = new Response();
     
    115134    }
    116135
     136    /// <summary>
     137    /// Remove a resource from a group
     138    /// </summary>
     139    /// <param name="clientGroupId"></param>
     140    /// <param name="resourceId"></param>
     141    /// <returns></returns>
    117142    public Response DeleteResourceFromGroup(long clientGroupId, long resourceId) {
    118143      Response response = new Response();
  • trunk/sources/HeuristicLab.Hive.Server.Core/JobManager.cs

    r1120 r1121  
    4040    }
    4141
     42    /// <summary>
     43    /// returns all jobs stored in the database
     44    /// </summary>
     45    /// <returns></returns>
    4246    public ResponseList<Job> GetAllJobs() {
    4347      ResponseList<Job> response = new ResponseList<Job>();
     
    5054    }
    5155
     56    /// <summary>
     57    /// Adds a new job into the database
     58    /// </summary>
     59    /// <param name="job"></param>
     60    /// <returns></returns>
    5261    public ResponseObject<Job> AddNewJob(Job job) {
    5362      ResponseObject<Job> response = new ResponseObject<Job>();
     
    8291    }
    8392
     93    /// <summary>
     94    /// Removes a job from the database
     95    /// </summary>
     96    /// <param name="jobId"></param>
     97    /// <returns></returns>
    8498    public Response RemoveJob(long jobId) {
    8599      Response response = new Response();
  • trunk/sources/HeuristicLab.Hive.Server.Core/UserRoleManager.cs

    r995 r1121  
    1 using System;
     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
     22using System;
    223using System.Collections.Generic;
    324using System.Linq;
     
    2445    #region IUserRoleManager Members
    2546
     47    /// <summary>
     48    /// returns all users from the database
     49    /// </summary>
     50    /// <returns></returns>
    2651    public ResponseList<User> GetAllUsers() {
    2752      ResponseList<User> response = new ResponseList<User>();
     
    3560    }
    3661
     62    /// <summary>
     63    /// Adds a new user to the database
     64    /// </summary>
     65    /// <param name="user"></param>
     66    /// <returns></returns>
    3767    public ResponseObject<User> AddNewUser(User user) {
    3868      ResponseObject<User> response = new ResponseObject<User>();
     
    5787    }
    5888
     89    /// <summary>
     90    /// returns all usergroups from the database
     91    /// </summary>
     92    /// <returns></returns>
    5993    public ResponseList<UserGroup> GetAllUserGroups() {
    6094      ResponseList<UserGroup> response = new ResponseList<UserGroup>();
     
    67101    }
    68102
     103    /// <summary>
     104    /// Removes a user from the database
     105    /// </summary>
     106    /// <param name="userId"></param>
     107    /// <returns></returns>
    69108    public Response RemoveUser(long userId) {
    70109      Response response = new Response();
     
    82121    }
    83122
     123    /// <summary>
     124    /// Adds a new usergroup to the database
     125    /// </summary>
     126    /// <param name="userGroup"></param>
     127    /// <returns></returns>
    84128    public ResponseObject<UserGroup> AddNewUserGroup(UserGroup userGroup) {
    85129      ResponseObject<UserGroup> response = new ResponseObject<UserGroup>();
     
    99143    }
    100144
     145    /// <summary>
     146    /// Removes a user group from the database
     147    /// </summary>
     148    /// <param name="groupId"></param>
     149    /// <returns></returns>
    101150    public Response RemoveUserGroup(long groupId) {
    102151      Response response = new Response();
     
    115164    }
    116165
     166    /// <summary>
     167    /// Adds a user into a user group
     168    /// </summary>
     169    /// <param name="groupId"></param>
     170    /// <param name="userId"></param>
     171    /// <returns></returns>
    117172    public Response AddUserToGroup(long groupId, long userId) {
    118173      Response response = new Response();
     
    140195    }
    141196
     197    /// <summary>
     198    /// Adds a user group to a user group
     199    /// </summary>
     200    /// <param name="groupId"></param>
     201    /// <param name="groupToAddId"></param>
     202    /// <returns></returns>
    142203    public Response AddUserGroupToGroup(long groupId, long groupToAddId) {
    143204      Response response = new Response();
     
    158219    }
    159220
     221    /// <summary>
     222    /// Removes a permission owner (user, user group) from a user group
     223    /// </summary>
     224    /// <param name="groupId"></param>
     225    /// <param name="permissionOwnerId"></param>
     226    /// <returns></returns>
    160227    public Response RemovePermissionOwnerFromGroup(long groupId, long permissionOwnerId) {
    161228      Response response = new Response();
Note: See TracChangeset for help on using the changeset viewer.