I'm trying to get all items from a Apache Ignite cache.
Currently I can get an individual item using
ClientCache<Integer, BinaryObject> cache = igniteClient.cache("myCache").withKeepBinary();
BinaryObject temp = cache.get(1);
To get all keys, Ive tried the following:
try(QueryCursor<Entry<Integer,BinaryObject>> cursor = cache.query(new ScanQuery<Integer, BinaryObject>(null))) {
for (Object p : cursor)
System.out.println(p.toString());
}
This returns a list of org.apache.ignite.internal.client.thin.ClientCacheEntry
which is internal, and I cannot call getValue
.
How can I get all items for this cache?