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 and also eventual consistency in general).
-
-
Constructor Summary
Constructors Constructor Description HybridQueryResults(LoadEngine loadEngine, com.google.cloud.datastore.QueryResults<Key<T>> source, int chunkSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.datastore.v1.QueryResultBatch.MoreResultsType
getMoreResults()
Class<?>
getResultClass()
int
getSkippedResults()
boolean
hasNext()
T
next()
-
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
-
-
-
-
Constructor Detail
-
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 Detail
-
getResultClass
public Class<?> 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>
-
-