Changeset 1374
- Timestamp:
- 03/20/09 12:12:05 (16 years ago)
- Location:
- trunk/sources
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IClientCommunicator.cs
r1369 r1374 40 40 ResponseJob SendJob(Guid clientId); 41 41 [OperationContract] 42 ResponseResultReceived ProcessJobResult(Guid clientId,42 ResponseResultReceived StoreFinishedJobResult(Guid clientId, 43 43 long jobId, 44 44 byte[] result, 45 45 double percentage, 46 Exception exception, 47 bool finished); 46 Exception exception); 47 [OperationContract] 48 ResponseResultReceived ProcessSnapshot(Guid clientId, 49 long jobId, 50 byte[] result, 51 double percentage, 52 Exception exception); 48 53 [OperationContract] 49 54 Response Logout(Guid clientId); -
trunk/sources/HeuristicLab.Hive.Server.Core/ClientCommunicator.cs
r1369 r1374 246 246 } 247 247 248 /// <summary> 249 /// the client can send job results during calculating 250 /// and will send a final job result when he finished calculating 251 /// these job results will be stored in the database 252 /// </summary> 253 /// <param name="clientId"></param> 254 /// <param name="jobId"></param> 255 /// <param name="result"></param> 256 /// <param name="exception"></param> 257 /// <param name="finished"></param> 258 /// <returns></returns> 259 public ResponseResultReceived ProcessJobResult(Guid clientId, 260 long jobId, 261 byte[] result, 248 private ResponseResultReceived ProcessJobResult(Guid clientId, 249 long jobId, 250 byte[] result, 262 251 double percentage, 263 Exception exception, 252 Exception exception, 264 253 bool finished) { 254 265 255 ResponseResultReceived response = new ResponseResultReceived(); 266 256 ClientInfo client = 267 257 clientAdapter.GetById(clientId); 268 258 269 Job job = 259 Job job = 270 260 jobAdapter.GetById(jobId); 271 261 272 if (job.Client == null) 262 if (job.Client == null) { 273 263 response.Success = false; 274 264 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOB_IS_NOT_BEEING_CALCULATED; … … 288 278 response.Success = true; 289 279 response.StatusMessage = ApplicationConstants.RESPONSE_COMMUNICATOR_JOBRESULT_RECEIVED; 290 return response; 280 return response; 291 281 } 292 282 if (job.State != State.calculating) { … … 306 296 307 297 List<JobResult> jobResults = new List<JobResult>(jobResultAdapter.GetResultsOf(job)); 308 foreach (JobResult currentResult in jobResults) 298 foreach (JobResult currentResult in jobResults) 309 299 jobResultAdapter.Delete(currentResult); 310 300 } … … 330 320 } 331 321 322 323 /// <summary> 324 /// the client can send job results during calculating 325 /// and will send a final job result when he finished calculating 326 /// these job results will be stored in the database 327 /// </summary> 328 /// <param name="clientId"></param> 329 /// <param name="jobId"></param> 330 /// <param name="result"></param> 331 /// <param name="exception"></param> 332 /// <param name="finished"></param> 333 /// <returns></returns> 334 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, 335 long jobId, 336 byte[] result, 337 double percentage, 338 Exception exception) { 339 340 return ProcessJobResult(clientId, jobId, result, percentage, exception, true); 341 } 342 343 344 public ResponseResultReceived ProcessSnapshot(Guid clientId, long jobId, byte[] result, double percentage, Exception exception) { 345 return ProcessJobResult(clientId, jobId, result, percentage, exception, false); 346 } 347 332 348 /// <summary> 333 349 /// when a client logs out the state will be set -
trunk/sources/HeuristicLab.Hive.Server.Core/ClientFacade.cs
r1369 r1374 48 48 } 49 49 50 public ResponseResultReceived ProcessJobResult(Guid clientId,50 public ResponseResultReceived StoreFinishedJobResult(Guid clientId, 51 51 long jobId, 52 52 byte[] result, 53 53 double percentage, 54 Exception exception, 55 bool finished) { 56 return clientCommunicator.ProcessJobResult(clientId, jobId, result, percentage, exception, finished); 54 Exception exception) { 55 return clientCommunicator.StoreFinishedJobResult(clientId, jobId, result, percentage, exception); 57 56 } 58 57 … … 69 68 } 70 69 70 public ResponseResultReceived ProcessSnapshot(Guid clientId, long jobId, byte[] result, double percentage, Exception exception) { 71 throw new NotImplementedException(); 72 } 73 71 74 #endregion 72 75 }
Note: See TracChangeset
for help on using the changeset viewer.