#1796 - ENH: add query.fetchCache(path) ... for explicitly building part of graph from L2 cache

This commit is contained in:
rob bygrave
2019-08-19 21:36:19 +12:00
parent 9155716752
commit 9674711516
20 changed files with 319 additions and 54 deletions
@@ -43,6 +43,8 @@ import java.util.function.Predicate;
*/
class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
private static final FetchConfig FETCH_CACHE = new FetchConfig().cache();
private static final FetchConfig FETCH_QUERY = new FetchConfig().query();
private static final FetchConfig FETCH_LAZY = new FetchConfig().lazy();
@@ -76,6 +78,11 @@ class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
return fetch(property, null, FETCH_QUERY);
}
@Override
public Query<T> fetchCache(String property) {
return fetch(property, null, FETCH_CACHE);
}
@Override
public Query<T> fetchLazy(String property) {
return fetch(property, null, FETCH_LAZY);
@@ -96,6 +103,11 @@ class DefaultFetchGroupQuery<T> implements SpiFetchGroupQuery<T> {
return fetch(property, columns, FETCH_QUERY);
}
@Override
public Query<T> fetchCache(String property, String columns) {
return fetch(property, columns, FETCH_CACHE);
}
@Override
public Query<T> fetchLazy(String property, String columns) {
return fetch(property, columns, FETCH_LAZY);