Represents the results of a CQ query that is executed using
CqQuery.executeWithInitialResults() The result will
contain the instances of
Struct
having key and value of the region entry that satisfy the
CQ query condition.
ClientCache cache = ...
QueryService queryService = PoolManager.find("client").getQueryService();
CqAttributesFactory cqAf = new CqAttributesFactory();
CqAttributes cqa = cqAf.create();
String cqQueryStr = "SELECT * FROM /root/employees " +
"WHERE salary > 50000";
CqQuery cq = queryService.newCq("MyCq", cqQueryStr, cqa);
CqResults results = cq.executeWithInitialResults();
for (Object o : results.asList()) {
Struct s = (Struct)o;
System.out.println("key : " + s.get("key") + " value : " + s.get("value"));
}