X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.db.impl%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fimpl%2Fquery%2FQueryCacheBase.java;h=e2737f891385911bdb321139dcd7b93a45ff518c;hb=1fb7e00de0895266e08097371c6f84e4322d6530;hp=4056f060b4f7fa6bfb54b74d0df474f63fa08191;hpb=ad18bf76b19bec530bc68c6041ab5fb245b8ee4d;p=simantics%2Fplatform.git diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java index 4056f060b..e2737f891 100644 --- a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java +++ b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/QueryCacheBase.java @@ -100,64 +100,64 @@ public class QueryCacheBase { listeners = new THashMap>(10, 0.75f); } - public Object performQuery(ReadGraphImpl parentGraph, final AsyncRead query, final CacheEntryBase entry_, AsyncProcedure procedure_) throws DatabaseException { - - AsyncReadEntry entry = (AsyncReadEntry)entry_; - AsyncProcedure procedure = (AsyncProcedure)procedure_; - - ReadGraphImpl queryGraph = parentGraph.withParent(entry_); - - try { - - query.perform(queryGraph, new AsyncProcedure() { - - @Override - public void execute(AsyncReadGraph returnGraph, T result) { - ReadGraphImpl impl = (ReadGraphImpl)returnGraph; - entry.addOrSet(parentGraph, result); - try { - procedure.execute(parentGraph, result); - } catch (Throwable t) { - t.printStackTrace(); - } -// parentBarrier.dec(query); - } - - @Override - public void exception(AsyncReadGraph returnGraph, Throwable t) { - ReadGraphImpl impl = (ReadGraphImpl)returnGraph; -// AsyncReadGraph resumeGraph = finalParentGraph.newAsync(); - entry.except(parentGraph, t); - try { - procedure.exception(parentGraph, t); - } catch (Throwable t2) { - t2.printStackTrace(); - } -// parentBarrier.dec(query); - } - - @Override - public String toString() { - return procedure.toString(); - } - - }); - - } catch (Throwable t) { - - entry.except(t); - try { - procedure.exception(parentGraph, t); - } catch (Throwable t2) { - t2.printStackTrace(); - } -// parentBarrier.dec(query); - - } - - return null; - - } +// public Object performQuery(ReadGraphImpl parentGraph, final AsyncRead query, final CacheEntryBase entry_, AsyncProcedure procedure_) throws DatabaseException { +// +// AsyncReadEntry entry = (AsyncReadEntry)entry_; +// AsyncProcedure procedure = (AsyncProcedure)procedure_; +// +// ReadGraphImpl queryGraph = parentGraph.withParent(entry_); +// +// try { +// +// query.perform(queryGraph, new AsyncProcedure() { +// +// @Override +// public void execute(AsyncReadGraph returnGraph, T result) { +// ReadGraphImpl impl = (ReadGraphImpl)returnGraph; +// entry.addOrSet(parentGraph, result); +// try { +// procedure.execute(parentGraph, result); +// } catch (Throwable t) { +// t.printStackTrace(); +// } +//// parentBarrier.dec(query); +// } +// +// @Override +// public void exception(AsyncReadGraph returnGraph, Throwable t) { +// ReadGraphImpl impl = (ReadGraphImpl)returnGraph; +//// AsyncReadGraph resumeGraph = finalParentGraph.newAsync(); +// entry.except(parentGraph, t); +// try { +// procedure.exception(parentGraph, t); +// } catch (Throwable t2) { +// t2.printStackTrace(); +// } +//// parentBarrier.dec(query); +// } +// +// @Override +// public String toString() { +// return procedure.toString(); +// } +// +// }); +// +// } catch (Throwable t) { +// +// entry.except(t); +// try { +// procedure.exception(parentGraph, t); +// } catch (Throwable t2) { +// t2.printStackTrace(); +// } +//// parentBarrier.dec(query); +// +// } +// +// return null; +// +// } // public Object performQuery(ReadGraphImpl parentGraph, final Read query, final CacheEntryBase entry_, AsyncProcedure procedure_) throws DatabaseException { //