Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1509


Ignore:
Timestamp:
04/03/09 14:22:14 (16 years ago)
Author:
msteinbi
Message:

Added Interfaces for Execution Engine (#572)

Location:
trunk/sources
Files:
7 edited

Legend:

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

    r1500 r1509  
    2828namespace HeuristicLab.Hive.Contracts.BusinessObjects {
    2929
    30   public enum State { nullState, idle, calculating, offline, finished };
     30  public enum State { nullState, idle, calculating, offline, finished, abort, requestSnapshot };
    3131
    3232  [DataContract]
  • trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IExecutionEngineFacade.cs

    r1485 r1509  
    3232    [OperationContract]
    3333    ResponseObject<Job> AddJob(Job job);
     34    [OperationContract]
     35    Response RequestSnapshot(Guid jobId);
     36    [OperationContract]
     37    ResponseObject<JobResult> GetLastResult(Guid jobId, bool requested);
     38    [OperationContract]
     39    Response AbortJob(Guid jobId);
    3440  }
    3541}
  • trunk/sources/HeuristicLab.Hive.Contracts/Interfaces/IJobManager.cs

    r1449 r1509  
    4040    Response RemoveJob(Guid jobId);
    4141    [OperationContract]
    42     ResponseObject<JobResult> GetLastJobResultOf(Guid jobId);
     42    ResponseObject<JobResult> GetLastJobResultOf(Guid jobId, bool requested);
     43    [OperationContract]
     44    Response RequestSnapshot(Guid jobId);
     45    [OperationContract]
     46    Response AbortJob(Guid jobId);
    4347  }
    4448}
  • trunk/sources/HeuristicLab.Hive.Server.Console/HiveServerManagementConsole.cs

    r1495 r1509  
    253253          IJobManager jobManager =
    254254            ServiceLocator.GetJobManager();
    255           ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id);
     255          ResponseObject<JobResult> jobRes = jobManager.GetLastJobResultOf(currentJob.Id, false);
    256256          lblJobCalculationEnd.Text = "Calculation ended at " + jobRes.Obj.DateFinished;
    257257        }
  • trunk/sources/HeuristicLab.Hive.Server.Core/ExecutionEngineFacade.cs

    r1485 r1509  
    4040    }
    4141
     42    public Response RequestSnapshot(Guid jobId) {
     43      return jobManager.RequestSnapshot(jobId);
     44    }
     45
     46    public ResponseObject<JobResult> GetLastResult(Guid jobId, bool requested) {
     47      return jobManager.GetLastJobResultOf(jobId, requested);
     48    }
     49
     50    public Response AbortJob(Guid jobId) {
     51      return jobManager.AbortJob(jobId);
     52    }
     53
    4254    #endregion
    4355  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/JobManager.cs

    r1468 r1509  
    229229    }
    230230
    231     public ResponseObject<JobResult> GetLastJobResultOf(Guid jobId) {
     231    public ResponseObject<JobResult> GetLastJobResultOf(Guid jobId, bool requested) {
    232232      ISession session = factory.GetSessionForCurrentThread();
    233233
     
    249249    }
    250250
     251    public Response RequestSnapshot(Guid jobId) {
     252      ISession session = factory.GetSessionForCurrentThread();
     253      Response response = new Response();
     254     
     255      try {
     256       
     257
     258        return response;
     259      }
     260      finally {
     261        if (session != null)
     262          session.EndSession();
     263      }
     264    }
     265
     266    public Response AbortJob(Guid jobId) {
     267      throw new NotImplementedException();
     268    }
     269
    251270    #endregion
    252271  }
  • trunk/sources/HeuristicLab.Hive.Server.Core/ServerConsoleFacade.cs

    r1449 r1509  
    9191    }
    9292
    93     public ResponseObject<JobResult> GetLastJobResultOf(Guid jobId) {
    94       return jobManager.GetLastJobResultOf(jobId);
     93    public ResponseObject<JobResult> GetLastJobResultOf(Guid jobId, bool requested) {
     94      return jobManager.GetLastJobResultOf(jobId, requested);
    9595    }
    9696
     
    9999    }
    100100
     101    public Response RequestSnapshot(Guid jobId) {
     102      return jobManager.RequestSnapshot(jobId);
     103    }
     104
     105    public Response AbortJob(Guid jobId) {
     106      return jobManager.AbortJob(jobId);
     107    }
     108
    101109    #endregion
    102110  }
Note: See TracChangeset for help on using the changeset viewer.