Changeset 1152
- Timestamp:
- 01/16/09 10:24:11 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Hive.Server.ADODataAccess/CachedDataAdapter.cs
r1149 r1152 105 105 protected virtual ObjT FindSingle(Selector dbSelector, 106 106 Selector cacheSelector) { 107 ObjT obj = default(ObjT); 108 109 cacheLock.AcquireReaderLock(Timeout.Infinite); 110 107 111 RowT row = FindSingleRow(dbSelector, cacheSelector); 108 112 109 113 if (row != null) { 110 ObjTobj = new ObjT();114 obj = new ObjT(); 111 115 obj = Convert(row, obj); 112 113 return obj; 114 } else {115 return default(ObjT); 116 }116 } 117 118 cacheLock.ReleaseReaderLock(); 119 120 return obj; 117 121 } 118 122 … … 178 182 179 183 protected override RowT GetRowById(long id) { 184 cacheLock.AcquireReaderLock(Timeout.Infinite); 185 180 186 RowT row = 181 187 FindCachedById(id); 182 188 189 //not in cache 183 190 if (row == null) 184 191 row = FindSingleRow( … … 186 193 return FindById(id); 187 194 }); 195 196 cacheLock.ReleaseReaderLock(); 188 197 189 198 return row;
Note: See TracChangeset
for help on using the changeset viewer.