- Timestamp:
- 09/08/11 10:38:36 (13 years ago)
- Location:
- branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3
- Files:
-
- 1 added
- 7 edited
- 7 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/Command.cs
r6703 r6717 22 22 using System; 23 23 24 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 24 namespace HeuristicLab.Services.Hive.DataAccess { 25 25 26 [Serializable] 26 27 public enum Command { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/CpuArchitecture.cs
r6703 r6717 20 20 #endregion 21 21 22 using System; 22 23 23 namespace HeuristicLab.Services.Hive. Common.DataTransfer{24 public enum SlaveState { 25 Idle,26 Calculating,27 Offline24 namespace HeuristicLab.Services.Hive.DataAccess { 25 26 [Serializable] 27 public enum CpuArchitecture { 28 x86, x64 28 29 }; 29 30 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/JobState.cs
r6703 r6717 22 22 using System; 23 23 24 namespace HeuristicLab.Services.Hive. Common.DataTransfer{24 namespace HeuristicLab.Services.Hive.DataAccess { 25 25 [Serializable] 26 26 public enum JobState { … … 65 65 Failed 66 66 }; 67 68 public static class JobStateExtensions {69 /// <summary>70 /// This job is not yet done71 /// </summary>72 public static bool IsActive(this JobState jobState) {73 return !jobState.IsDone();74 }75 76 /// <summary>77 /// This job is Waiting78 /// </summary>79 public static bool IsWaiting(this JobState jobState) {80 return jobState == JobState.Waiting;81 }82 83 /// <summary>84 /// This job is Finished || Failed || Aborted85 /// </summary>86 public static bool IsDone(this JobState jobState) {87 return jobState == JobState.Finished ||88 jobState == JobState.Aborted ||89 jobState == JobState.Failed;90 }91 }92 67 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/Permission.cs
r6703 r6717 20 20 #endregion 21 21 22 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 22 using System; 23 namespace HeuristicLab.Services.Hive.DataAccess { 24 25 [Serializable] 23 26 public enum Permission { 24 27 /// <summary> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Enums/SlaveState.cs
r6703 r6717 20 20 #endregion 21 21 22 using System; 22 23 23 namespace HeuristicLab.Services.Hive.Common.DataTransfer { 24 namespace HeuristicLab.Services.Hive.DataAccess { 25 26 [Serializable] 24 27 public enum SlaveState { 25 28 Idle, -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLab.Services.Hive.DataAccess-3.3.csproj
r6701 r6717 94 94 </ItemGroup> 95 95 <ItemGroup> 96 <Compile Include="Convert.cs" />97 96 <None Include="HeuristicLabServicesHiveDataAccessPlugin.cs.frame" /> 97 <Compile Include="Enums\Command.cs" /> 98 <Compile Include="Enums\CpuArchitecture.cs" /> 98 99 <Compile Include="HeuristicLabServicesHiveDataAccessPlugin.cs" /> 99 <Compile Include="HiveDao.cs" />100 100 <Compile Include="HiveDataContext.cs"> 101 101 <DependentUpon>HiveDataContext.dbml</DependentUpon> … … 106 106 <DependentUpon>HiveDataContext.dbml</DependentUpon> 107 107 </Compile> 108 <Compile Include="Interfaces\IHiveDao.cs" /> 108 <Compile Include="ITransactionManager.cs" /> 109 <Compile Include="Enums\JobState.cs" /> 110 <Compile Include="Logger.cs" /> 111 <Compile Include="Enums\Permission.cs" /> 109 112 <Compile Include="Properties\AssemblyInfo.cs" /> 110 113 <None Include="Properties\AssemblyInfo.cs.frame" /> … … 114 117 <DependentUpon>Settings.settings</DependentUpon> 115 118 </Compile> 119 <Compile Include="Enums\SlaveState.cs" /> 116 120 <Compile Include="TransactionManager.cs" /> 117 121 </ItemGroup> … … 130 134 </None> 131 135 <None Include="Settings.settings"> 132 <Generator> SettingsSingleFileGenerator</Generator>136 <Generator>PublicSettingsSingleFileGenerator</Generator> 133 137 <LastGenOutput>Settings.Designer.cs</LastGenOutput> 134 138 </None> … … 138 142 <DependentUpon>HiveDataContext.dbml</DependentUpon> 139 143 </None> 140 </ItemGroup>141 <ItemGroup>142 <ProjectReference Include="..\..\HeuristicLab.Services.Hive.Common\3.3\HeuristicLab.Services.Hive.Common-3.3.csproj">143 <Project>{14424A16-48D4-445E-80BF-DDF617548BBB}</Project>144 <Name>HeuristicLab.Services.Hive.Common-3.4</Name>145 </ProjectReference>146 144 </ItemGroup> 147 145 <ItemGroup> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HeuristicLabServicesHiveDataAccessPlugin.cs.frame
r6701 r6717 31 31 [PluginDependency("HeuristicLab.Common", "3.3")] 32 32 [PluginDependency("HeuristicLab.Core", "3.3")] 33 [PluginDependency("HeuristicLab.Persistence", "3.3")] 34 [PluginDependency("HeuristicLab.Services.Hive.Common", "3.3")] 33 [PluginDependency("HeuristicLab.Persistence", "3.3")] 35 34 public class HeuristicLabServicesHiveDataAccessPlugin : PluginBase { 36 35 } -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml
r6698 r6717 1 1 <?xml version="1.0" encoding="utf-8"?><Database Name="HeuristicLab.Hive" Class="HiveDataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007"> 2 <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3. 4;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Hive.DataAccess.Settings" SettingsPropertyName="HeuristicLab_Hive_LinqConnectionString" Provider="System.Data.SqlClient" />2 <Connection Mode="AppSettings" ConnectionString="Data Source=localhost;Initial Catalog=HeuristicLab.Hive-3.3;Integrated Security=True" SettingsObjectName="HeuristicLab.Services.Hive.DataAccess.Settings" SettingsPropertyName="HeuristicLab_Hive_LinqConnectionString" Provider="System.Data.SqlClient" /> 3 3 <Table Name="dbo.AssignedResources" Member="AssignedResources"> 4 4 <Type Name="AssignedResource"> … … 45 45 <Column Name="Memory" Type="System.Int32" DbType="Int" CanBeNull="true" /> 46 46 <Column Name="Login" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> 47 <Column Name="SlaveState" Storage="_Status" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.SlaveState" DbType="VarChar(15)" CanBeNull="true" />47 <Column Name="SlaveState" Storage="_Status" Type="global::HeuristicLab.Services.Hive.DataAccess.SlaveState" DbType="VarChar(15)" CanBeNull="true" /> 48 48 <Column Name="Cores" Storage="_NumberOfCores" Type="System.Int32" DbType="Int" CanBeNull="true" /> 49 49 <Column Name="FreeCores" Storage="_NumberOfFreeCores" Type="System.Int32" DbType="Int" CanBeNull="true" /> 50 50 <Column Name="FreeMemory" Type="System.Int32" DbType="Int" CanBeNull="true" /> 51 51 <Column Name="IsAllowedToCalculate" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 52 <Column Name="CpuArchitecture" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.CpuArchitecture" DbType="VarChar(3)" CanBeNull="false" />52 <Column Name="CpuArchitecture" Type="global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture" DbType="VarChar(3)" CanBeNull="false" /> 53 53 <Column Name="OperatingSystem" Type="System.String" DbType="VarChar(MAX)" CanBeNull="false" UpdateCheck="Never" /> 54 54 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> … … 61 61 <Type Name="Job"> 62 62 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 63 <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState" DbType="VarChar(30)" CanBeNull="false" />63 <Column Name="JobState" Member="State" Type="global::HeuristicLab.Services.Hive.DataAccess.JobState" DbType="VarChar(30)" CanBeNull="false" /> 64 64 <Column Name="ExecutionTimeMs" Storage="_ExecutionTime" Type="System.Double" DbType="float" CanBeNull="false" /> 65 65 <Column Name="LastHeartbeat" Type="System.DateTime" DbType="DateTime" CanBeNull="true" /> … … 70 70 <Column Name="IsParentJob" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 71 71 <Column Name="FinishWhenChildJobsFinished" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> 72 <Column Name="Command" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.Command?" DbType="VarChar(30)" CanBeNull="true" />72 <Column Name="Command" Type="global::HeuristicLab.Services.Hive.DataAccess.Command?" DbType="VarChar(30)" CanBeNull="true" /> 73 73 <Column Name="HiveExperimentId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 74 74 <Column Name="IsPrivileged" Type="System.Boolean" DbType="Bit" CanBeNull="false" /> … … 128 128 <Type Name="StateLog"> 129 129 <Column Name="StateLogId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" IsDbGenerated="true" CanBeNull="false" /> 130 <Column Name="State" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" />130 <Column Name="State" Type="global::HeuristicLab.Services.Hive.DataAccess.JobState" DbType="VarChar(30) NOT NULL" CanBeNull="false" /> 131 131 <Column Name="DateTime" Type="System.DateTime" DbType="DateTime NOT NULL" CanBeNull="false" /> 132 132 <Column Name="JobId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> … … 143 143 <Column Name="GrantedUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" IsPrimaryKey="true" CanBeNull="false" /> 144 144 <Column Name="GrantedByUserId" Type="System.Guid" DbType="UniqueIdentifier NOT NULL" CanBeNull="false" /> 145 <Column Name="Permission" Type="global::HeuristicLab.Services.Hive. Common.DataTransfer.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" />145 <Column Name="Permission" Type="global::HeuristicLab.Services.Hive.DataAccess.Permission" DbType="VarChar(15) NOT NULL" CanBeNull="false" /> 146 146 <Association Name="HiveExperiment_HiveExperimentPermission" Member="HiveExperiment" ThisKey="HiveExperimentId" OtherKey="HiveExperimentId" Type="HiveExperiment" IsForeignKey="true" /> 147 147 </Type> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.dbml.layout
r6698 r6717 69 69 </nodes> 70 70 </inheritanceConnector> 71 <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom=" Algorithm" fixedTo="Algorithm">71 <associationConnector edgePoints="[(11.9843735 : 2.57859537760417); (11.9843735 : 4.59699625651042); (10.875 : 4.59699625651042)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 72 72 <AssociationMoniker Name="/HiveDataContext/Resource/Resource_AssignedResource" /> 73 73 <nodes> … … 76 76 </nodes> 77 77 </associationConnector> 78 <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (8.875 : 4.751650890625)]" fixedFrom=" Algorithm" fixedTo="Algorithm">78 <associationConnector edgePoints="[(7.5 : 4.30930826822917); (7.5 : 4.751650890625); (8.875 : 4.751650890625)]" fixedFrom="NotFixed" fixedTo="NotFixed"> 79 79 <AssociationMoniker Name="/HiveDataContext/Job/Job_AssignedResource" /> 80 80 <nodes> -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/HiveDataContext.designer.cs
r6698 r6717 1137 1137 private System.Nullable<System.DateTime> _Login; 1138 1138 1139 private global::HeuristicLab.Services.Hive. Common.DataTransfer.SlaveState _Status;1139 private global::HeuristicLab.Services.Hive.DataAccess.SlaveState _Status; 1140 1140 1141 1141 private System.Nullable<int> _NumberOfCores; … … 1147 1147 private bool _IsAllowedToCalculate; 1148 1148 1149 private global::HeuristicLab.Services.Hive. Common.DataTransfer.CpuArchitecture _CpuArchitecture;1149 private global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture _CpuArchitecture; 1150 1150 1151 1151 private string _OperatingSystem; … … 1165 1165 partial void OnLoginChanging(System.Nullable<System.DateTime> value); 1166 1166 partial void OnLoginChanged(); 1167 partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.SlaveState value);1167 partial void OnSlaveStateChanging(global::HeuristicLab.Services.Hive.DataAccess.SlaveState value); 1168 1168 partial void OnSlaveStateChanged(); 1169 1169 partial void OnCoresChanging(System.Nullable<int> value); … … 1175 1175 partial void OnIsAllowedToCalculateChanging(bool value); 1176 1176 partial void OnIsAllowedToCalculateChanged(); 1177 partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.CpuArchitecture value);1177 partial void OnCpuArchitectureChanging(global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture value); 1178 1178 partial void OnCpuArchitectureChanged(); 1179 1179 partial void OnOperatingSystemChanging(string value); … … 1251 1251 1252 1252 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Status", DbType="VarChar(15)", CanBeNull=true)] 1253 public global::HeuristicLab.Services.Hive. Common.DataTransfer.SlaveState SlaveState1253 public global::HeuristicLab.Services.Hive.DataAccess.SlaveState SlaveState 1254 1254 { 1255 1255 get … … 1351 1351 1352 1352 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CpuArchitecture", DbType="VarChar(3)", CanBeNull=false)] 1353 public global::HeuristicLab.Services.Hive. Common.DataTransfer.CpuArchitecture CpuArchitecture1353 public global::HeuristicLab.Services.Hive.DataAccess.CpuArchitecture CpuArchitecture 1354 1354 { 1355 1355 get … … 1454 1454 private System.Guid _JobId; 1455 1455 1456 private global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState _State;1456 private global::HeuristicLab.Services.Hive.DataAccess.JobState _State; 1457 1457 1458 1458 private double _ExecutionTime; … … 1472 1472 private bool _FinishWhenChildJobsFinished; 1473 1473 1474 private global::HeuristicLab.Services.Hive. Common.DataTransfer.Command? _Command;1474 private global::HeuristicLab.Services.Hive.DataAccess.Command? _Command; 1475 1475 1476 1476 private System.Guid _HiveExperimentId; … … 1498 1498 partial void OnJobIdChanging(System.Guid value); 1499 1499 partial void OnJobIdChanged(); 1500 partial void OnStateChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState value);1500 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.JobState value); 1501 1501 partial void OnStateChanged(); 1502 1502 partial void OnExecutionTimeMsChanging(double value); … … 1516 1516 partial void OnFinishWhenChildJobsFinishedChanging(bool value); 1517 1517 partial void OnFinishWhenChildJobsFinishedChanged(); 1518 partial void OnCommandChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.Command? value);1518 partial void OnCommandChanging(global::HeuristicLab.Services.Hive.DataAccess.Command? value); 1519 1519 partial void OnCommandChanged(); 1520 1520 partial void OnHiveExperimentIdChanging(System.Guid value); … … 1557 1557 1558 1558 [global::System.Data.Linq.Mapping.ColumnAttribute(Name="JobState", Storage="_State", DbType="VarChar(30)", CanBeNull=false)] 1559 public global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState State1559 public global::HeuristicLab.Services.Hive.DataAccess.JobState State 1560 1560 { 1561 1561 get … … 1741 1741 1742 1742 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Command", DbType="VarChar(30)", CanBeNull=true)] 1743 public global::HeuristicLab.Services.Hive. Common.DataTransfer.Command? Command1743 public global::HeuristicLab.Services.Hive.DataAccess.Command? Command 1744 1744 { 1745 1745 get … … 2889 2889 private System.Guid _StateLogId; 2890 2890 2891 private global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState _State;2891 private global::HeuristicLab.Services.Hive.DataAccess.JobState _State; 2892 2892 2893 2893 private System.DateTime _DateTime; … … 2911 2911 partial void OnStateLogIdChanging(System.Guid value); 2912 2912 partial void OnStateLogIdChanged(); 2913 partial void OnStateChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState value);2913 partial void OnStateChanging(global::HeuristicLab.Services.Hive.DataAccess.JobState value); 2914 2914 partial void OnStateChanged(); 2915 2915 partial void OnDateTimeChanging(System.DateTime value); … … 2953 2953 2954 2954 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_State", DbType="VarChar(30) NOT NULL", CanBeNull=false)] 2955 public global::HeuristicLab.Services.Hive. Common.DataTransfer.JobState State2955 public global::HeuristicLab.Services.Hive.DataAccess.JobState State 2956 2956 { 2957 2957 get … … 3181 3181 private System.Guid _GrantedByUserId; 3182 3182 3183 private global::HeuristicLab.Services.Hive. Common.DataTransfer.Permission _Permission;3183 private global::HeuristicLab.Services.Hive.DataAccess.Permission _Permission; 3184 3184 3185 3185 private EntityRef<HiveExperiment> _HiveExperiment; … … 3195 3195 partial void OnGrantedByUserIdChanging(System.Guid value); 3196 3196 partial void OnGrantedByUserIdChanged(); 3197 partial void OnPermissionChanging(global::HeuristicLab.Services.Hive. Common.DataTransfer.Permission value);3197 partial void OnPermissionChanging(global::HeuristicLab.Services.Hive.DataAccess.Permission value); 3198 3198 partial void OnPermissionChanged(); 3199 3199 #endregion … … 3270 3270 3271 3271 [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Permission", DbType="VarChar(15) NOT NULL", CanBeNull=false)] 3272 public global::HeuristicLab.Services.Hive. Common.DataTransfer.Permission Permission3272 public global::HeuristicLab.Services.Hive.DataAccess.Permission Permission 3273 3273 { 3274 3274 get -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/ITransactionManager.cs
r6703 r6717 22 22 using System; 23 23 24 namespace HeuristicLab.Services.Hive {24 namespace HeuristicLab.Services.Hive.DataAccess { 25 25 public interface ITransactionManager { 26 26 void UseTransaction(Action call, bool serializable = false, bool longRunning = false); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Logger.cs
r6703 r6717 25 25 using System.Threading; 26 26 27 namespace HeuristicLab.Services.Hive. Common{27 namespace HeuristicLab.Services.Hive.DataAccess { 28 28 public class LogFactory { 29 29 public static ILogger GetLogger(string source) { -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/Settings.Designer.cs
r6712 r6717 14 14 [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 15 [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "10.0.0.0")] 16 internalsealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {16 public sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 17 18 18 private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); -
branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.3/TransactionManager.cs
r6452 r6717 22 22 using System; 23 23 using System.Transactions; 24 using HeuristicLab.Services.Hive. Common;24 using HeuristicLab.Services.Hive.DataAccess; 25 25 26 26 namespace HeuristicLab.Services.Hive.DataAccess {
Note: See TracChangeset
for help on using the changeset viewer.