Changeset 557
- Timestamp:
- 09/12/08 17:36:43 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.CEDMA.DB/Store.cs
r551 r557 41 41 private string connectionString; 42 42 private SemWeb.Store store; 43 private object bigLock = new object(); 43 44 public Store(string connectionString) { 44 this.connectionString = connectionString; 45 store = SemWeb.Store.Create(connectionString); 45 lock(bigLock) { 46 this.connectionString = connectionString; 47 store = SemWeb.Store.Create(connectionString); 48 } 46 49 } 47 50 48 51 public void Add(Statement statement) { 49 store.Add(Translate(statement)); 52 lock(bigLock) { 53 store.Add(Translate(statement)); 54 } 50 55 } 51 56 52 57 public IList<Statement> Select(Statement template) { 53 SemWeb.SelectResult result = store.Select(Translate(template)); 58 SemWeb.SelectResult result; 59 lock(bigLock) { 60 result = store.Select(Translate(template)); 61 } 54 62 List<Statement> r = new List<Statement>(); 55 63 foreach(SemWeb.Statement resultStatement in result) { … … 60 68 61 69 public IList<Statement> Select(SelectFilter filter) { 62 SemWeb.SelectResult result = store.Select(Translate(filter)); 70 SemWeb.SelectResult result; 71 lock(bigLock) { 72 result = store.Select(Translate(filter)); 73 } 63 74 List<Statement> r = new List<Statement>(); 64 75 foreach(SemWeb.Statement resultStatement in result) {
Note: See TracChangeset
for help on using the changeset viewer.