X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.impl%2Fsrc%2Forg%2Fsimantics%2Fdb%2Fimpl%2Fquery%2FCacheEntry.java;h=a650f32ce8dc6ee1f70166cbb3e21c31b6604f17;hp=d65622dadd0a18ecafb1c15b3c7c22b15b345cb0;hb=HEAD;hpb=0ae2b770234dfc3cbb18bd38f324125cf0faca07 diff --git a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntry.java b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntry.java index d65622dad..a650f32ce 100644 --- a/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntry.java +++ b/bundles/org.simantics.db.impl/src/org/simantics/db/impl/query/CacheEntry.java @@ -11,12 +11,14 @@ *******************************************************************************/ package org.simantics.db.impl.query; +import java.util.Collection; + import org.simantics.db.exception.DatabaseException; import org.simantics.db.impl.graph.ReadGraphImpl; -public abstract class CacheEntry { +public abstract class CacheEntry { final public static int HAS_BEEN_BOUND = 1; @@ -29,28 +31,30 @@ public abstract class CacheEntry { abstract void setReady(); abstract void refute(); - abstract void setPending(); + abstract void setPending(QuerySupport querySupport); abstract void discard(); abstract void except(Throwable t); - abstract void setResult(Object result); abstract void clearResult(QuerySupport support); abstract void prepareRecompute(QuerySupport querySupport); abstract public Object getOriginalRequest(); abstract Query getQuery(); - abstract T getResult(); abstract CacheEntry pruneFirstParents(); + abstract void pruneParentSet(); abstract void removeParent(CacheEntry entry); abstract void addParent(CacheEntry entry); abstract boolean hasParents(); - abstract Iterable getParents(QueryProcessor processor); + abstract Collection> getParents(QueryProcessor processor); abstract CacheEntry getFirstParent(QueryProcessor processor); abstract boolean moreThanOneParent(QueryProcessor processor); abstract int parentCount(QueryProcessor processor); - abstract void performFromCache(ReadGraphImpl graph, Object provider, Object procedure); + abstract T getResult(); + abstract void setResult(Object result); + + abstract Object performFromCache(ReadGraphImpl graph, Procedure procedure) throws DatabaseException; abstract boolean isImmutable(ReadGraphImpl graph) throws DatabaseException;