Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/24/11 16:55:48 (13 years ago)
Author:
cneumuel
Message:

#1233

  • extended statistics recording:
    • execution times of users are captured
    • execution times and start-to-finish time of finished jobs is captured (to computer hive overhead)
    • data of deleted jobs is automatically captured in DeletedJobStatistics
  • changed ExecutionTime type in database from string to float (milliseconds are stored instead of TimeSpan.ToString())
  • added IsPrivileged field to job to indicate if it should be executed in a privileged sandbox
  • added CpuUtilization field to slave to be able to report cpu utilization
  • added GetJobsByResourceId to retrieve all jobs which are currently beeing calculated in a slave(-group)
  • TransactionManager now allows to use serializable tranactions (used for lifecycle trigger)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.Hive-3.4/sources/HeuristicLab.Services.Hive.DataAccess/3.4/TransactionManager.cs

    r5708 r6267  
    11using System;
    22using System.Transactions;
    3 using HeuristicLab.Services.Hive.Common;
    43
    54namespace HeuristicLab.Services.Hive.DataAccess {
    65  public class TransactionManager {
    7     public void UseTransaction(Action call) {
    8       TransactionScope transaction = CreateTransaction();
     6    public void UseTransaction(Action call, bool serializable = false) {
     7      TransactionScope transaction = serializable ? CreateSerializableTransaction() : CreateTransaction();
    98      try {
    109        call();
     
    1615    }
    1716
    18     public T UseTransaction<T>(Func<T> call) {
    19       TransactionScope transaction = CreateTransaction();
     17    public T UseTransaction<T>(Func<T> call, bool serializable = false) {
     18      TransactionScope transaction = serializable ? CreateSerializableTransaction() : CreateTransaction();
    2019      try {
    2120        T result = call();
     
    2928
    3029    private static TransactionScope CreateTransaction() {
    31       return new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = ApplicationConstants.IsolationLevelScope });
     30      return new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.ReadUncommitted });
     31    }
     32    private static TransactionScope CreateSerializableTransaction() {
     33      return new TransactionScope(TransactionScopeOption.Required, new TransactionOptions { IsolationLevel = IsolationLevel.Serializable });
    3234    }
    3335  }
Note: See TracChangeset for help on using the changeset viewer.