Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/09/08 21:37:36 (16 years ago)
Author:
gkronber
Message:

worked on #188

Location:
trunk/sources/HeuristicLab.CEDMA.DB.Interfaces
Files:
1 added
4 edited
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/AgentEntry.cs

    r372 r375  
    3535    public string Name { get; set; }
    3636    [DataMember]
    37     public AgentStatus Status { get; set; }
     37    public ProcessStatus Status { get; set; }
    3838    [DataMember]
    3939    public byte[] RawData { get; set; }
    40 
    41     public AgentEntry(long id, string name, AgentStatus status, byte[] rawData) {
    42       Id = id;
    43       Name = name;
    44       Status = status;
    45       RawData = rawData;
    46     }
    4740  }
    4841}
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/HeuristicLab.CEDMA.DB.Interfaces.csproj

    r372 r375  
    5959  <ItemGroup>
    6060    <Compile Include="AgentEntry.cs" />
    61     <Compile Include="AgentStatus.cs" />
     61    <Compile Include="ProcessStatus.cs" />
     62    <Compile Include="RunEntry.cs" />
    6263    <Compile Include="ResultEntry.cs" />
    6364    <Compile Include="HeuristicLabCedmaDbInterfacesPlugin.cs" />
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/IDatabase.cs

    r372 r375  
    3131  public interface IDatabase {
    3232    [OperationContract]
    33     ICollection<AgentEntry> GetAgentEntries();
     33    long InsertAgent(string name, byte[] rawData);
     34
     35    [OperationContract(Name = "UpdateAgentName")]
     36    void UpdateAgent(long id, string name);
     37
     38    [OperationContract(Name = "UpdateAgentStatus")]
     39    void UpdateAgent(long id, ProcessStatus status);
     40
     41    [OperationContract(Name = "UpdateAgentData")]
     42    void UpdateAgent(long id, byte[] rawData);
    3443
    3544    [OperationContract]
    36     long CreateAgent();
     45    long InsertRun(long agentId, byte[] rawData);
    3746
    38     [OperationContract(Name="UpdateAgent")]
    39     void Update(AgentEntry entry);
     47    [OperationContract]
     48    void UpdateRunStart(long runId, DateTime CreationTime);
    4049
    41     [OperationContract(Name ="UpdateResult")]
    42     void Update(ResultEntry result);
     50    [OperationContract]
     51    void UpdateRunFinished(long runId, DateTime CreationTime);
     52
     53    [OperationContract]
     54    void UpdateRunStatus(long runId, ProcessStatus status);
     55
     56    [OperationContract]
     57    long InsertResult(long runId, byte[] rawData);
     58
     59    [OperationContract]
     60    long InsertSubResult(long resultId, byte[] rawData);
     61
     62
     63    // should be replaced by more powerful querying interface (LINQ provider?)
     64    [OperationContract]
     65    ICollection<AgentEntry> GetAgents();
     66
     67    [OperationContract]
     68    ICollection<RunEntry> GetRuns();
     69
     70    [OperationContract]
     71    ICollection<ResultEntry> GetResults(long runId);
     72
     73    [OperationContract]
     74    ICollection<ResultEntry> GetSubResults(long resultId);
     75
    4376  }
    4477}
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ProcessStatus.cs

    r372 r375  
    2626
    2727namespace HeuristicLab.CEDMA.DB.Interfaces {
    28   public enum AgentStatus { Unkown, Active, Finished, Error, Waiting}
     28  public enum ProcessStatus { Unkown, Active, Finished, Error, Waiting}
    2929}
  • trunk/sources/HeuristicLab.CEDMA.DB.Interfaces/ResultEntry.cs

    r372 r375  
    3131  public class ResultEntry {
    3232    [DataMember]
    33     private long id;
     33    public long Id { get; set; }
    3434    [DataMember]
    35     private byte[] rawData;
    36 
    37     public ResultEntry(long id, byte[] rawData) {
    38       this.id = id;
    39       this.rawData = rawData;
    40     }
    41 
    42     public long Id {
    43       get { return id; }
    44     }
    45 
    46     public byte[] RawData {
    47       get { return rawData; }
    48     }
     35    public long RunId { get; set; }
     36    [DataMember]
     37    public long ResultId { get; set; }
     38    [DataMember]
     39    public DateTime CreationTime { get; set; }
     40    [DataMember]
     41    public byte[] RawData { get; set; }
    4942  }
    5043}
Note: See TracChangeset for help on using the changeset viewer.