Changeset 4092 for branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
- Timestamp:
- 07/23/10 14:17:20 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/3.3-HiveMigration/sources/HeuristicLab.Hive/HeuristicLab.Hive.Server.Core/3.3/ClientCommunicator.cs
r4091 r4092 40 40 public class ClientCommunicator : IClientCommunicator, 41 41 IInternalClientCommunicator { 42 private static Dictionary<Guid, DateTime> lastHeartbeats = 43 new Dictionary<Guid, DateTime>(); 44 private static Dictionary<Guid, int> newAssignedJobs = 45 new Dictionary<Guid, int>(); 46 private static Dictionary<Guid, int> pendingJobs = 47 new Dictionary<Guid, int>(); 48 49 private static ReaderWriterLockSlim heartbeatLock = 50 new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); 42 private static Dictionary<Guid, DateTime> lastHeartbeats = new Dictionary<Guid, DateTime>(); 43 private static Dictionary<Guid, int> newAssignedJobs = new Dictionary<Guid, int>(); 44 private static Dictionary<Guid, int> pendingJobs = new Dictionary<Guid, int>(); 45 46 private static ReaderWriterLockSlim heartbeatLock = new ReaderWriterLockSlim(LockRecursionPolicy.SupportsRecursion); 51 47 52 48 //private ISessionFactory factory; … … 81 77 Logger.Debug("Server Heartbeat ticked"); 82 78 79 // [chn] why is transaction management done here 83 80 using (TransactionScope scope = new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.ISOLATION_LEVEL_SCOPE })) { 84 85 81 List<ClientDto> allClients = new List<ClientDto>(DaoLocator.ClientDao.FindAll()); 86 82 … … 144 140 } 145 141 CheckForPendingJobs(); 146 DaoLocator.DestroyContext();142 // DaoLocator.DestroyContext(); 147 143 scope.Complete(); 148 144 } … … 595 591 } 596 592 597 598 593 /// <summary> 599 594 /// the client can send job results during calculating … … 616 611 } 617 612 618 619 613 public ResponseResultReceived ProcessSnapshot(Guid clientId, Guid jobId, byte[] result, double percentage, Exception exception) { 620 614 return ProcessJobResult(clientId, jobId, result, percentage, exception, false); … … 628 622 /// <returns></returns> 629 623 public Response Logout(Guid clientId) { 630 631 624 Logger.Info("Client logged out " + clientId); 632 625 … … 720 713 721 714 return response; 722 723 715 } 724 716
Note: See TracChangeset
for help on using the changeset viewer.