Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/08/09 15:46:53 (16 years ago)
Author:
svonolfe
Message:

Improved caching (#372)

Location:
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs

    r1093 r1094  
    3939      new CacheT();
    4040
    41     protected IDictionary<long, DataTable> dataTable =
    42       new Dictionary<long, DataTable>();
    43 
    4441    protected ICollection<ICachedDataAdapter> parentAdapters =
    4542      new List<ICachedDataAdapter>();
     
    130127    [MethodImpl(MethodImplOptions.Synchronized)]
    131128    protected abstract RowT FindCachedById(long id);
     129
     130    protected abstract DataTable GetDataTable();
    132131
    133132    [MethodImpl(MethodImplOptions.Synchronized)]
     
    192191            !PutInCache(obj)) {
    193192          //remove from cache
    194           dataTable[obj.Id].ImportRow(row);
    195           dataTable.Remove(obj.Id);
     193          GetDataTable().ImportRow(row);
    196194
    197195          UpdateRow(row);
     
    202200          cache.ImportRow(row);
    203201
    204           dataTable[obj.Id] = row.Table;
    205           row.Table.Rows.Remove(row);
     202          GetDataTable().Rows.Remove(row);
    206203        }
    207204      }
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ClientAdapter.cs

    r1014 r1094  
    200200        new Selector(adapter.GetData),
    201201        new Selector(cache.AsEnumerable<dsHiveServer.ClientRow>));
     202    }
     203
     204    protected override System.Data.DataTable GetDataTable() {
     205      return data;
    202206    }
    203207    #endregion
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/JobAdapter.cs

    r1092 r1094  
    188188        new Selector(adapter.GetData),
    189189        new Selector(cache.AsEnumerable<dsHiveServer.JobRow>));
     190    }
     191
     192    protected override System.Data.DataTable GetDataTable() {
     193      return data;
    190194    }
    191195
  • trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/ResourceAdapter.cs

    r995 r1094  
    126126        new Selector(cache.AsEnumerable<dsHiveServer.ResourceRow>));
    127127    }
     128
     129    protected override System.Data.DataTable GetDataTable() {
     130      return data;
     131    }
    128132    #endregion
    129133
Note: See TracChangeset for help on using the changeset viewer.