[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-05 Thread osma
GitHub user osma opened a pull request: https://github.com/apache/jena/pull/119 JENA-999: jena-text Lucene cache using multimaps This set of commits implements a caching layer for Lucene queries. The cache is stored in the Context so that it is persisted even when new TextQueryPF's

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-05 Thread ajs6f
Github user ajs6f commented on a diff in the pull request: https://github.com/apache/jena/pull/119#discussion_r48902208 --- Diff: jena-text/src/main/java/org/apache/jena/query/text/TextQueryPF.java --- @@ -268,7 +276,25 @@ private QueryIterator concreteSubject(Binding binding, Nod

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-05 Thread ajs6f
Github user ajs6f commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-169147952 I wonder if it is better to rely directly on the Guava classes here or to try to use a `org.apache.jena.atlas.lib.Cache<>`? --- If your project is set up for it, you can re

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-07 Thread osma
Github user osma commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-169590779 @ajs6f There are two layers of map-like things here. The outer one is the actual cache (query parameters to result set), and LinkedHashMap is currently used for that but some

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-07 Thread osma
Github user osma commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-169611251 Oh right, I didn't notice `getOrFill`. So am I right that the consensus would be to 1. switch to one of the Jena Cache implementations instead of using java.util.

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-09 Thread osma
Github user osma commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170214419 I have now implemented the changes. I went for a 10-slot Atlas cache, which is a LRU cache in my understanding though the decision is left to the CacheFactory. I think it's b

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread ajs6f
Github user ajs6f commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170342439 It reads more clearly to me, but I'm just one data point. {grin} --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as we

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread afs
Github user afs commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170362532 Java8 is still new, many people haven't had the chance to learn the new possibilities and idioms. Clarity and maintenance matter. I like to think of it as "programming for th

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread ajs6f
Github user ajs6f commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170371507 But `getOrFill` is not new with Java 8, is it? --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your projec

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread afs
Github user afs commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170372723 Feel free to merge this when convenient. --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does n

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread osma
Github user osma closed the pull request at: https://github.com/apache/jena/pull/119 --- If your project is set up for it, you can reply to this email and have your reply appear on GitHub as well. If your project does not have this feature enabled and wishes so, or if the feature is enabled

[GitHub] jena pull request: JENA-999: jena-text Lucene cache using multimap...

2016-01-10 Thread osma
Github user osma commented on the pull request: https://github.com/apache/jena/pull/119#issuecomment-170452765 I decided to merge as-is (after rebase), i.e. using `getOrFill` and the lambda function. It's not too unclear either way. I'm just not yet used to this style of Java programm