X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.db.indexing%2Fsrc%2Forg%2Fsimantics%2Fdb%2Findexing%2FIndexedRelationsSearcher.java;h=a535183f2cd7ce0289c82b1638264d4331ef95b8;hp=115e54595585bafe2b3b5ca88a9e0c2f2bee4c03;hb=8b8630b9;hpb=0242b51bcb69c03ea15aa785abc39ed70c9dbbd7 diff --git a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java index 115e54595..a535183f2 100644 --- a/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java +++ b/bundles/org.simantics.db.indexing/src/org/simantics/db/indexing/IndexedRelationsSearcher.java @@ -27,13 +27,17 @@ import org.simantics.db.Session; import org.simantics.db.exception.DatabaseException; import org.simantics.db.layer0.adapter.GenericRelation; import org.simantics.utils.datastructures.Pair; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; /** * @author Tuukka Lehtonen * @author Antti Villberg */ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { - + + private static final Logger LOGGER = LoggerFactory.getLogger(IndexedRelationsSearcher.class); + IndexedRelationsMemorySearcher cache; IndexedRelationsSearcher(RequestProcessor session, Resource relation, Resource input, GenericRelation r) throws DatabaseException { @@ -126,7 +130,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { MemoryIndexing mem = MemoryIndexing.getInstance(session.getSession()); - String key = indexPath.getAbsolutePath(); + String key = indexPath.toAbsolutePath().toString(); Map>> cache = mem.persistentCache.get(key); if(cache != null) { @@ -154,7 +158,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { MemoryIndexing mem = MemoryIndexing.getInstance(session.getSession()); - String key = indexPath.getAbsolutePath(); + String key = indexPath.toAbsolutePath().toString(); Map> cache = mem.persistentCacheResources.get(key); if(cache != null) { @@ -280,7 +284,7 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { t = cache.bestEffortClear(monitor, session); if(t != null) return t; - String key = indexPath.getAbsolutePath(); + String key = indexPath.toAbsolutePath().toString(); MemoryIndexing mem = MemoryIndexing.getInstance(session); mem.persistentCache.remove(key); mem.persistentCacheResources.remove(key); @@ -288,5 +292,10 @@ public class IndexedRelationsSearcher extends IndexedRelationsSearcherBase { return null; } + + @Override + protected Logger getLogger() { + return LOGGER; + } }