- final static DirectObjects entry(final QueryProcessor provider, final int r1, final int r2) {
-
- return (DirectObjects)provider.directObjectsMap.get(id(r1,r2));
-
- }
-
- final static Collection<DirectObjects> entries(final QueryProcessor processor, final int r1) {
- DoubleKeyQueryHashMap<IntProcedure> hash = processor.directObjectsMap;
- return hash.values(r1);
- }
-
- final static void runner(ReadGraphImpl graph, final int r1, final int r2, CacheEntry parent, final ListenerBase listener, final IntProcedure procedure) {
-
- QueryProcessor processor = graph.processor;
-
- DirectObjects entry = (DirectObjects)processor.directObjectsMap.get(id(r1,r2));
- if(entry == null) {
-
- entry = new DirectObjects(r1, r2);
- entry.setPending();
- entry.clearResult(processor.querySupport);
- entry.putEntry(processor);
-
- processor.performForEach(graph, entry, parent, listener, procedure);
-
- } else {
-
- if(entry.isPending()) {
- synchronized(entry) {
- if(entry.isPending()) {
- processor.registerDependencies(graph, entry, parent, listener, procedure, false);
- entry.computeForEach(graph, processor, procedure, true);
- return;
- }
- }
- }
-
- processor.performForEach(graph, entry, parent, listener, procedure);
-
- }
-
- }
-
- final public static void queryEach(ReadGraphImpl graph, final int r1, final int r2, final QueryProcessor provider, final CacheEntry parent, final ListenerBase listener, final IntProcedure procedure) {