Package com.googlecode.objectify.impl
Class HybridQueryResults<T>
java.lang.Object
com.googlecode.objectify.impl.HybridQueryResults<T>
- All Implemented Interfaces:
com.google.cloud.datastore.QueryResults<T>
,Iterator<T>
public class HybridQueryResults<T>
extends Object
implements com.google.cloud.datastore.QueryResults<T>
Converts keys-only query results into hybrid query results. This involves chunking the keys into batches and loading
each from the datastore. Care is taken to preserve cursor behavior and filter null results (possible due to both
the time delay between the query and the load).
-
Constructor Summary
ConstructorDescriptionHybridQueryResults
(LoadEngine loadEngine, com.google.cloud.datastore.QueryResults<Key<T>> source, int chunkSize) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
Methods inherited from interface com.google.cloud.datastore.QueryResults
getCursorAfter
-
Constructor Details
-
HybridQueryResults
public HybridQueryResults(LoadEngine loadEngine, com.google.cloud.datastore.QueryResults<Key<T>> source, int chunkSize) - Parameters:
chunkSize
- can be MAX_VALUE to indicate "just one chunk"
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
-
getResultClass
- Specified by:
getResultClass
in interfacecom.google.cloud.datastore.QueryResults<T>
-
getSkippedResults
public int getSkippedResults()- Specified by:
getSkippedResults
in interfacecom.google.cloud.datastore.QueryResults<T>
-
getMoreResults
public com.google.datastore.v1.QueryResultBatch.MoreResultsType getMoreResults()- Specified by:
getMoreResults
in interfacecom.google.cloud.datastore.QueryResults<T>
-